]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
alx: Fix an error handling path in 'alx_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 11 Jun 2021 06:13:39 +0000 (08:13 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:37 +0000 (19:27 +0200)
BugLink: https://bugs.launchpad.net/bugs/1934179
[ Upstream commit 33e381448cf7a05d76ac0b47d4a6531ecd0e5c53 ]

If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: ab69bde6b2e9 ("alx: add a simple AR816x/AR817x device driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/atheros/alx/main.c

index d8e61734df2be1c94351fb33ac91fc7063f67fa3..c714ccc131fbee8a37948f7674052cd4b299bff0 100644 (file)
@@ -1920,6 +1920,7 @@ out_free_netdev:
        free_netdev(netdev);
 out_pci_release:
        pci_release_mem_regions(pdev);
+       pci_disable_pcie_error_reporting(pdev);
 out_pci_disable:
        pci_disable_device(pdev);
        return err;