提交 12eb0879 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册