]> err.no Git - linux-2.6/blobdiff - drivers/net/wan/n2.c
[PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree
[linux-2.6] / drivers / net / wan / n2.c
index cd32751b64eb6e6f6e8355a54a21e3cf751b15cc..b7d88db89a5c7918e5a827aeb6465cab7b5411a7 100644 (file)
@@ -387,6 +387,11 @@ static int __init n2_run(unsigned long io, unsigned long irq,
        }
        card->phy_winbase = winbase;
        card->winbase = ioremap(winbase, USE_WINDOWSIZE);
+       if (!card->winbase) {
+               printk(KERN_ERR "n2: ioremap() failed\n");
+               n2_destroy_card(card);
+               return -EFAULT;
+       }
 
        outb(0, io + N2_PCR);
        outb(winbase >> 12, io + N2_BAR);