Skip to content

Commit

Permalink
ATHEROS-ATL1E: Convert iounmap to pci_iounmap
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Peter Senna Tschudin authored and David S. Miller committed Mar 18, 2014
1 parent 7346135 commit 3e3d354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/atheros/atl1e/atl1e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_register:
err_sw_init:
err_eeprom:
iounmap(adapter->hw.hw_addr);
pci_iounmap(pdev, adapter->hw.hw_addr);
err_init_netdev:
err_ioremap:
free_netdev(netdev);
Expand Down Expand Up @@ -2474,7 +2474,7 @@ static void atl1e_remove(struct pci_dev *pdev)
unregister_netdev(netdev);
atl1e_free_ring_resources(adapter);
atl1e_force_ps(&adapter->hw);
iounmap(adapter->hw.hw_addr);
pci_iounmap(pdev, adapter->hw.hw_addr);
pci_release_regions(pdev);
free_netdev(netdev);
pci_disable_device(pdev);
Expand Down

0 comments on commit 3e3d354

Please sign in to comment.