summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-11-06 08:48:23 +0100
committerKalle Valo <kvalo@codeaurora.org>2015-11-26 14:03:19 +0200
commit21ba005464a95e2ac57e13d035d11d29f483738a (patch)
tree060cb8542a292dfcd5373a07cbee7c764e34b7e7 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
parentaeb64225aa8e74804f81aa3e31b7a3860fd2b730 (diff)
downloadlinux-21ba005464a95e2ac57e13d035d11d29f483738a.tar.gz
linux-21ba005464a95e2ac57e13d035d11d29f483738a.tar.bz2
linux-21ba005464a95e2ac57e13d035d11d29f483738a.zip
brcm80211: Delete an unnecessary check before the function call "release_firmware"
The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 4248f3c80e78..33afb9aafa9b 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -449,8 +449,7 @@ static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
if (raw_nvram)
bcm47xx_nvram_release_contents(data);
- if (fw)
- release_firmware(fw);
+ release_firmware(fw);
if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
goto fail;