]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netxen_nic: Fix an error handling path in 'netxen_nic_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 12 Jun 2021 12:53:12 +0000 (14:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Jun 2021 19:17:01 +0000 (12:17 -0700)
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: e87ad5539343 ("netxen: support pci error handlers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c

index 7e6bac85495d3a15b3a6f6aa49307e9abb5988fc..344ea11434549f82e77a0625c8937083142b9fc4 100644 (file)
@@ -1602,6 +1602,8 @@ err_out_free_netdev:
        free_netdev(netdev);
 
 err_out_free_res:
+       if (NX_IS_REVISION_P3(pdev->revision))
+               pci_disable_pcie_error_reporting(pdev);
        pci_release_regions(pdev);
 
 err_out_disable_pdev: