]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: free cached fw bin contents when get board id fails
authorRaja Mani <rmani@qti.qualcomm.com>
Thu, 10 Mar 2016 04:55:07 +0000 (10:25 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 18 Mar 2016 07:53:26 +0000 (09:53 +0200)
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>
drivers/net/wireless/ath/ath10k/core.c

index 2389c0713c13a902130265ef8ff056f42489106c..d5d0b88aa5fe7ea502912c342009fcb659fb7c78 100644 (file)
@@ -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);