Commit 3bfafd6b136bea2de9bd96c01b7e3808635a15b2
Committed by
David S. Miller
1 parent
a58c891a53
Exists in
master
and in
20 other branches
netxen: avoid invalid iounmap
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>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
drivers/net/netxen/netxen_nic_main.c
... | ... | @@ -1004,8 +1004,10 @@ |
1004 | 1004 | |
1005 | 1005 | iounmap(adapter->ahw.db_base); |
1006 | 1006 | iounmap(adapter->ahw.pci_base0); |
1007 | - iounmap(adapter->ahw.pci_base1); | |
1008 | - iounmap(adapter->ahw.pci_base2); | |
1007 | + if (adapter->ahw.pci_base1 != NULL) | |
1008 | + iounmap(adapter->ahw.pci_base1); | |
1009 | + if (adapter->ahw.pci_base2 != NULL) | |
1010 | + iounmap(adapter->ahw.pci_base2); | |
1009 | 1011 | |
1010 | 1012 | pci_release_regions(pdev); |
1011 | 1013 | pci_disable_device(pdev); |