Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75009b3a authored by Peter Senna Tschudin's avatar Peter Senna Tschudin Committed by Jeff Kirsher
Browse files

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: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 3dbb7fd2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2652,7 +2652,7 @@ err_eeprom:
		iounmap(hw->flash_address);
err_sw_init:
	igb_clear_interrupt_scheme(adapter);
	iounmap(hw->hw_addr);
	pci_iounmap(pdev, hw->hw_addr);
err_ioremap:
	free_netdev(netdev);
err_alloc_etherdev:
@@ -2819,7 +2819,7 @@ static void igb_remove(struct pci_dev *pdev)
	igb_disable_sriov(pdev);
#endif

	iounmap(hw->hw_addr);
	pci_iounmap(pdev, hw->hw_addr);
	if (hw->flash_address)
		iounmap(hw->flash_address);
	pci_release_selected_regions(pdev,