Skip to content

Commit 75009b3

Browse files
petersennaJeff Kirsher
authored andcommitted
INTEL-IGB: Convert iounmap to pci_iounmap
Use pci_iounmap instead of iounmap when the virtual mapping was done with pci_iomap. A simplified version of the semantic patch that finds this issue is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ expression addr; @@ addr = pci_iomap(...) @rr@ expression r.addr; @@ * iounmap(addr) // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 3dbb7fd commit 75009b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/ethernet/intel/igb/igb_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
26522652
iounmap(hw->flash_address);
26532653
err_sw_init:
26542654
igb_clear_interrupt_scheme(adapter);
2655-
iounmap(hw->hw_addr);
2655+
pci_iounmap(pdev, hw->hw_addr);
26562656
err_ioremap:
26572657
free_netdev(netdev);
26582658
err_alloc_etherdev:
@@ -2819,7 +2819,7 @@ static void igb_remove(struct pci_dev *pdev)
28192819
igb_disable_sriov(pdev);
28202820
#endif
28212821

2822-
iounmap(hw->hw_addr);
2822+
pci_iounmap(pdev, hw->hw_addr);
28232823
if (hw->flash_address)
28242824
iounmap(hw->flash_address);
28252825
pci_release_selected_regions(pdev,

0 commit comments

Comments
 (0)