* [PATCH] ath10k: free cached fw bin contents when get board id fails
@ 2016-03-10 4:55 Raja Mani
2016-03-18 7:54 ` Valo, Kalle
0 siblings, 1 reply; 2+ messages in thread
From: Raja Mani @ 2016-03-10 4:55 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Raja Mani
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>
---
drivers/net/wireless/ath/ath10k/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 4d31764..a76d8ac 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1833,7 +1833,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);
--
1.8.1.2
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath10k: free cached fw bin contents when get board id fails
2016-03-10 4:55 [PATCH] ath10k: free cached fw bin contents when get board id fails Raja Mani
@ 2016-03-18 7:54 ` Valo, Kalle
0 siblings, 0 replies; 2+ messages in thread
From: Valo, Kalle @ 2016-03-18 7:54 UTC (permalink / raw)
To: Raja Mani; +Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Raja Mani <rmani@qti.qualcomm.com> writes:
> 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>
Applied, thanks.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-18 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 4:55 [PATCH] ath10k: free cached fw bin contents when get board id fails Raja Mani
2016-03-18 7:54 ` Valo, Kalle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox