Skip to content

Commit

Permalink
netxen: avoid invalid iounmap
Browse files Browse the repository at this point in the history
For NX3031 only one I/O range is mapped, so unmapping other
two which are used by older chips, causes this warning on
ppc64.

"Attempt to iounmap early bolted mapping at 0x0000000000000000"

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jan 16, 2009
1 parent a58c891 commit 3bfafd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,10 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)

iounmap(adapter->ahw.db_base);
iounmap(adapter->ahw.pci_base0);
iounmap(adapter->ahw.pci_base1);
iounmap(adapter->ahw.pci_base2);
if (adapter->ahw.pci_base1 != NULL)
iounmap(adapter->ahw.pci_base1);
if (adapter->ahw.pci_base2 != NULL)
iounmap(adapter->ahw.pci_base2);

pci_release_regions(pdev);
pci_disable_device(pdev);
Expand Down

0 comments on commit 3bfafd6

Please sign in to comment.