]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/netxen/netxen_nic_main.c
netxen: avoid invalid iounmap
[linux-2.6-omap-h63xx.git] / drivers / net / netxen / netxen_nic_main.c
index 86867405a367daa5b1bef9d6b1f0133774e5ea1f..f8e26290a22f9772e1ce52636d351f56992411b5 100644 (file)
@@ -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);