Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9585a92 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: fix error handling in pci_probe



If chip_id wasn't recognized clean up code wasn't
executed properly. It would skip freeing memory
causing a leak and irqs causing possibly MSI
warning splats later or even kernel crashes.

Fixes: 1a7fecb7 ("ath10k: reset chip before reading chip_id in probe")
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 26bea13a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2684,7 +2684,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
	if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) {
	if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) {
		ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
		ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
			   pdev->device, chip_id);
			   pdev->device, chip_id);
		goto err_sleep;
		goto err_free_irq;
	}
	}


	ret = ath10k_core_register(ar, chip_id);
	ret = ath10k_core_register(ar, chip_id);