diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-04-09 22:51:07 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 15:06:07 -0400 |
commit | a7b957a277215da1830596c0791307a999fe5153 (patch) | |
tree | a5675f24770760ff356cf34fc0a43a4bba378cad /drivers/net/wireless/libertas/main.c | |
parent | d144f536e38a8e6fcd6e8e4c9035f107be9f7d62 (diff) |
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.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 957681dede1..3b81b709bf9 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; } |