]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:28 +0000 (16:53 +0200)
commiteba4ebc40954ca23895dd5988841fd67bbcf757d
tree85c3bf5f1f7bb8acadae5546b01eb2e81300d400
parent9d8dce107bddda663ea5b251cc6c96b0f7030d8d
ath10k: add missing error return code in ath10k_pci_probe()

[ Upstream commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3 ]

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: 332acd108dca ("ath10k: remove target soc ps code")
Fixes: 3264082bbe2b ("ath10k: create a chip revision whitelist")
Fixes: f8914a14623a ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/pci.c