igc: Prefer to use the pci_release_mem_regions method
authorSasha Neftin <sasha.neftin@intel.com>
Sun, 10 Nov 2019 14:05:20 +0000 (16:05 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 31 Dec 2019 19:17:25 +0000 (11:17 -0800)
Use the pci_release_mem_regions method instead of the
pci_release_selected_regions method

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c

index 91acce2e1d1c93d120130f266da87816911929f4..de8e4b570fa6bcd879392e5d117c8aebe796903f 100644 (file)
@@ -4527,8 +4527,7 @@ err_sw_init:
 err_ioremap:
        free_netdev(netdev);
 err_alloc_etherdev:
-       pci_release_selected_regions(pdev,
-                                    pci_select_bars(pdev, IORESOURCE_MEM));
+       pci_release_mem_regions(pdev);
 err_pci_reg:
 err_dma:
        pci_disable_device(pdev);