Skip to content

Commit

Permalink
ath10k: free cached fw bin contents when get board id fails
Browse files Browse the repository at this point in the history
ath10k_core_probe_fw() simply returns error without freeing
cached firmware file content when get board id operation fails.
Free cached fw bin data in failure case to avoid memory leak.

Fixes: db0984e ("ath10k: select board data based on BMI chip id and board id")
Signed-off-by: Raja Mani <rmani@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Raja Mani authored and Kalle Valo committed Mar 18, 2016
1 parent cac0855 commit b9c191b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
if (ret && ret != -EOPNOTSUPP) {
ath10k_err(ar, "failed to get board id from otp: %d\n",
ret);
return ret;
goto err_free_firmware_files;
}

ret = ath10k_core_fetch_board_file(ar);
Expand Down

0 comments on commit b9c191b

Please sign in to comment.