]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: fix error unwind on arch_init() failure in PCI probe
authorRipan Deuri <ripan.deuri@oss.qualcomm.com>
Tue, 19 May 2026 19:28:15 +0000 (00:58 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 26 May 2026 15:54:27 +0000 (08:54 -0700)
When arch_init() fails in ath12k_pci_probe(), the code jumps to
err_pci_msi_free, leaking resources in teardown.

Redirect the failure path to err_free_irq so teardown matches the setup order.

Compile-tested only.

Fixes: 614c23e24ee8 ("wifi: ath12k: Support arch-specific DP device allocation")
Signed-off-by: Ripan Deuri <ripan.deuri@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260519192815.3911324-1-ripan.deuri@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/pci.c

index 375277ca2b89214fae0bae30c913ed6bdeb4114b..d9a22d6afbb020059d7e3163198375fde89de1eb 100644 (file)
@@ -1639,7 +1639,7 @@ static int ath12k_pci_probe(struct pci_dev *pdev,
        ret = ab_pci->device_family_ops->arch_init(ab);
        if (ret) {
                ath12k_err(ab, "PCI arch_init failed %d\n", ret);
-               goto err_pci_msi_free;
+               goto err_free_irq;
        }
 
        ret = ath12k_core_init(ab);