diff options
author | Raja Mani <rmani@qti.qualcomm.com> | 2016-03-09 23:55:07 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-03-18 03:53:26 -0400 |
commit | b9c191be3fbdd9d78be11160dd7a3ddb9fdc6d42 (patch) | |
tree | 344f41ef9eb7620a8f473e18307ee7324d69532f | |
parent | cac085524cf16434ac1d42427a8644cf532d3e87 (diff) |
ath10k: free cached fw bin contents when get board id fails
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>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 2389c0713c13..d5d0b88aa5fe 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c | |||
@@ -1839,7 +1839,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar) | |||
1839 | if (ret && ret != -EOPNOTSUPP) { | 1839 | if (ret && ret != -EOPNOTSUPP) { |
1840 | ath10k_err(ar, "failed to get board id from otp: %d\n", | 1840 | ath10k_err(ar, "failed to get board id from otp: %d\n", |
1841 | ret); | 1841 | ret); |
1842 | return ret; | 1842 | goto err_free_firmware_files; |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | ret = ath10k_core_fetch_board_file(ar); | 1845 | ret = ath10k_core_fetch_board_file(ar); |