summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring2015-02-04 19:30:23 +0100
committerKalle Valo2015-03-04 13:05:40 +0100
commitdb2cf865c75792f2e52596bf3e94e9a98272becf (patch)
treebbb9758b8a632e389e98337b60376c0b23214f2b
parentath10k: add TxBF support (diff)
downloadkernel-qcow2-linux-db2cf865c75792f2e52596bf3e94e9a98272becf.tar.gz
kernel-qcow2-linux-db2cf865c75792f2e52596bf3e94e9a98272becf.tar.xz
kernel-qcow2-linux-db2cf865c75792f2e52596bf3e94e9a98272becf.zip
ath10k: delete unnecessary checks 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> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 310e12bc078a..c0e454bb6a8d 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -436,16 +436,16 @@ static int ath10k_download_fw(struct ath10k *ar, enum ath10k_firmware_mode mode)
static void ath10k_core_free_firmware_files(struct ath10k *ar)
{
- if (ar->board && !IS_ERR(ar->board))
+ if (!IS_ERR(ar->board))
release_firmware(ar->board);
- if (ar->otp && !IS_ERR(ar->otp))
+ if (!IS_ERR(ar->otp))
release_firmware(ar->otp);
- if (ar->firmware && !IS_ERR(ar->firmware))
+ if (!IS_ERR(ar->firmware))
release_firmware(ar->firmware);
- if (ar->cal_file && !IS_ERR(ar->cal_file))
+ if (!IS_ERR(ar->cal_file))
release_firmware(ar->cal_file);
ar->board = NULL;