summaryrefslogtreecommitdiff
path: root/drivers/net/wan/wanxl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 05:15:09 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 05:15:09 (GMT)
commit065a3e17baa36d1d48eb7376138820035b44775e (patch)
tree556abb5dbeaad98fc5a66bd56f6a647dfbd22182 /drivers/net/wan/wanxl.c
parent45c091bb2d453ce4a8b06cf19872ec7a77fc4799 (diff)
parentbfcbb00855db21dacd3c154ea13ec3fdd98e747b (diff)
downloadlinux-fsl-qoriq-065a3e17baa36d1d48eb7376138820035b44775e.tar.xz
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (33 commits) [PATCH] myri10ge - drop workaround pci_save_state() disabling MSI [PATCH] myri10ge - drop workaround for the missing AER ext cap on nVidia CK804 via-velocity: the link is not correctly detected when the device starts [PATCH] add b44 to maintainers [PATCH] WAN: ioremap() failure checks in drivers [PATCH] WAN: register_hdlc_device() doesn't need dev_alloc_name() [PATCH] skb_padto()-area fixes in 8390, wavelan [PATCH] make drivers/net/forcedeth.c:nv_update_pause() static [PATCH] network driver for Hilscher netx [PATCH] Dereference in tokenring/olympic.c [PATCH] Array overrun in drivers/net/wireless/wavelan.c [PATCH] Remove useless check in drivers/net/pcmcia/xirc2ps_cs.c [PATCH] 8139cp: add ethtool eeprom support [PATCH] 8139cp: fix eeprom read command length [PATCH] b44: update b44 Kconfig entry [PATCH] b44: update version to 1.01 [PATCH] b44: add wol for old nic [PATCH] b44: add parameter [PATCH] b44: add wol [PATCH] b44: fix manual speed/duplex/autoneg settings ...
Diffstat (limited to 'drivers/net/wan/wanxl.c')
-rw-r--r--drivers/net/wan/wanxl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index 29a756d..437e0e9 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -634,7 +634,13 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
/* set up PLX mapping */
plx_phy = pci_resource_start(pdev, 0);
+
card->plx = ioremap_nocache(plx_phy, 0x70);
+ if (!card->plx) {
+ printk(KERN_ERR "wanxl: ioremap() failed\n");
+ wanxl_pci_remove_one(pdev);
+ return -EFAULT;
+ }
#if RESET_WHILE_LOADING
wanxl_reset(card);
@@ -700,6 +706,12 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
}
mem = ioremap_nocache(mem_phy, PDM_OFFSET + sizeof(firmware));
+ if (!mem) {
+ printk(KERN_ERR "wanxl: ioremap() failed\n");
+ wanxl_pci_remove_one(pdev);
+ return -EFAULT;
+ }
+
for (i = 0; i < sizeof(firmware); i += 4)
writel(htonl(*(u32*)(firmware + i)), mem + PDM_OFFSET + i);