ath10k: free cached fw bin contents when get board id fails
commit b9c191be3fbdd9d78be11160dd7a3ddb9fdc6d42 upstream. 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: db0984e51a18 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
db05a639e4
commit
dc4f0e1cf9
@ -1805,7 +1805,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
if (ret && ret != -EOPNOTSUPP) {
|
||||
ath10k_err(ar, "failed to get board id from otp for qca99x0: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
goto err_free_firmware_files;
|
||||
}
|
||||
|
||||
ret = ath10k_core_fetch_board_file(ar);
|
||||
|
Loading…
x
Reference in New Issue
Block a user