Commit ae94a379 authored by Raja Mani's avatar Raja Mani Committed by Kleber Sacilotto de Souza

ath10k: free cached fw bin contents when get board id fails

BugLink: https://bugs.launchpad.net/bugs/1878232

commit b9c191be 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: db0984e5 ("ath10k: select board data based on BMI chip id and board id")
Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent b1a704ae
...@@ -1897,7 +1897,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar) ...@@ -1897,7 +1897,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
if (ret && ret != -EOPNOTSUPP) { if (ret && ret != -EOPNOTSUPP) {
ath10k_err(ar, "failed to get board id from otp for qca99x0: %d\n", ath10k_err(ar, "failed to get board id from otp for qca99x0: %d\n",
ret); ret);
return ret; goto err_free_firmware_files;
} }
ret = ath10k_core_check_smbios(ar); ret = ath10k_core_check_smbios(ar);
......
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