]> www.infradead.org Git - users/dwmw2/linux.git/commit
wifi: ath11k: Fix error path in ath11k_pcic_ext_irq_config
authorBreno Leitao <leitao@debian.org>
Thu, 16 May 2024 08:30:41 +0000 (11:30 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 17 May 2024 06:54:32 +0000 (09:54 +0300)
commit637c435f08ea7e77c53a2ad590b651d0de225e3b
treeb1745428b54cad4c3180ab13b2f1c24721b6d1e0
parent1d60eabb82694e58543e2b6366dae3e7465892a5
wifi: ath11k: Fix error path in ath11k_pcic_ext_irq_config

If one of the dummy allocation fails in ath11k_pcic_ext_irq_config(),
the previous allocated devices might leak due to returning without
deallocating the devices.

Instead of returning on the error path, deallocate all the previously
allocated net_devices and then return.

Fixes: bca592ead825 ("wifi: ath11k: allocate dummy net_device dynamically")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240508185902.70975-1-leitao@debian.org
drivers/net/wireless/ath/ath11k/pcic.c