]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: add missing error return code in ath10k_pci_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 31 May 2021 14:41:28 +0000 (17:41 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 12 Jun 2021 10:34:31 +0000 (13:34 +0300)
commitd87cef4c9599259eba36bcb488f197945f7c60de
tree833f3c7c30a21532e42b82757372512be7b4fc47
parent981bb03173237b5d2fa88e0743a7a7cab07d5220
ath10k: add missing error return code in ath10k_pci_probe()

When chip_id is not supported, the resources will be freed
on path err_unsupported, these resources will also be freed
when calling ath10k_pci_remove(), it will cause double free,
so return -ENODEV when it doesn't support the device with wrong
chip_id.

Fixes: a32c7093fb77 ("ath10k: remove target soc ps code")
Fixes: cc06403c80ba ("ath10k: create a chip revision whitelist")
Fixes: 3e2bfc03fbb6 ("ath10k: restore QCA9880-AR1A (v1) detection")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210522105822.1091848-3-yangyingliang@huawei.com
drivers/net/wireless/ath/ath10k/pci.c