summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-04-09 22:51:07 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:06:07 -0400
commita7b957a277215da1830596c0791307a999fe5153 (patch)
treea5675f24770760ff356cf34fc0a43a4bba378cad /drivers/net/wireless/libertas/main.c
parentd144f536e38a8e6fcd6e8e4c9035f107be9f7d62 (diff)
downloadblackbird-op-linux-a7b957a277215da1830596c0791307a999fe5153.tar.gz
blackbird-op-linux-a7b957a277215da1830596c0791307a999fe5153.zip
wireless, libertas: remove redundant NULL tests before calling release_firmware()
release_firmware() tests for, and deals gracefully with, NULL pointers. Remove redundant explicit tests before calling the function. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 957681dede17..3b81b709bf9e 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1269,14 +1269,10 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
fail:
/* Failed */
- if (*helper) {
- release_firmware(*helper);
- *helper = NULL;
- }
- if (*mainfw) {
- release_firmware(*mainfw);
- *mainfw = NULL;
- }
+ release_firmware(*helper);
+ *helper = NULL;
+ release_firmware(*mainfw);
+ *mainfw = NULL;
return -ENOENT;
}
OpenPOWER on IntegriCloud