diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-04 13:30:23 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-03-04 07:05:40 -0500 |
commit | db2cf865c75792f2e52596bf3e94e9a98272becf (patch) | |
tree | bbb9758b8a632e389e98337b60376c0b23214f2b | |
parent | 139e170da98a23c3ce9ecb68cf042bdad10ce647 (diff) |
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.c | 8 |
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) | |||
436 | 436 | ||
437 | static void ath10k_core_free_firmware_files(struct ath10k *ar) | 437 | static void ath10k_core_free_firmware_files(struct ath10k *ar) |
438 | { | 438 | { |
439 | if (ar->board && !IS_ERR(ar->board)) | 439 | if (!IS_ERR(ar->board)) |
440 | release_firmware(ar->board); | 440 | release_firmware(ar->board); |
441 | 441 | ||
442 | if (ar->otp && !IS_ERR(ar->otp)) | 442 | if (!IS_ERR(ar->otp)) |
443 | release_firmware(ar->otp); | 443 | release_firmware(ar->otp); |
444 | 444 | ||
445 | if (ar->firmware && !IS_ERR(ar->firmware)) | 445 | if (!IS_ERR(ar->firmware)) |
446 | release_firmware(ar->firmware); | 446 | release_firmware(ar->firmware); |
447 | 447 | ||
448 | if (ar->cal_file && !IS_ERR(ar->cal_file)) | 448 | if (!IS_ERR(ar->cal_file)) |
449 | release_firmware(ar->cal_file); | 449 | release_firmware(ar->cal_file); |
450 | 450 | ||
451 | ar->board = NULL; | 451 | ar->board = NULL; |