Commit 12eb0879 authored by Wei Yongjun's avatar Wei Yongjun Committed by Kalle Valo

ath10k: fix possible memory leak in ath10k_pci_probe()

memory is malloced in ath10k_pci_probe() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent e2045481
...@@ -2471,7 +2471,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, ...@@ -2471,7 +2471,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
ret = ath10k_do_pci_wake(ar); ret = ath10k_do_pci_wake(ar);
if (ret) { if (ret) {
ath10k_err("Failed to get chip id: %d\n", ret); ath10k_err("Failed to get chip id: %d\n", ret);
return ret; goto err_iomap;
} }
chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS); chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
......
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