Commit db2cf865 authored by Markus Elfring's avatar Markus Elfring Committed by Kalle Valo

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 139e170d
...@@ -436,16 +436,16 @@ static int ath10k_download_fw(struct ath10k *ar, enum ath10k_firmware_mode mode) ...@@ -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) 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); release_firmware(ar->board);
if (ar->otp && !IS_ERR(ar->otp)) if (!IS_ERR(ar->otp))
release_firmware(ar->otp); release_firmware(ar->otp);
if (ar->firmware && !IS_ERR(ar->firmware)) if (!IS_ERR(ar->firmware))
release_firmware(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); release_firmware(ar->cal_file);
ar->board = NULL; ar->board = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment