igc: Fix an error handling path in 'igc_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 12 Jun 2021 20:00:05 +0000 (22:00 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 1 Jul 2021 17:53:22 +0000 (10:53 -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: c9a11c23ceb6 ("igc: Add netdev")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c

index 1d00a63..e29aadb 100644 (file)
@@ -6056,6 +6056,7 @@ err_sw_init:
 err_ioremap:
        free_netdev(netdev);
 err_alloc_etherdev:
+       pci_disable_pcie_error_reporting(pdev);
        pci_release_mem_regions(pdev);
 err_pci_reg:
 err_dma: