aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/wanxl.c
diff options
context:
space:
mode:
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 29a756dd979b..437e0e938e38 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,
634 634
635 /* set up PLX mapping */ 635 /* set up PLX mapping */
636 plx_phy = pci_resource_start(pdev, 0); 636 plx_phy = pci_resource_start(pdev, 0);
637
637 card->plx = ioremap_nocache(plx_phy, 0x70); 638 card->plx = ioremap_nocache(plx_phy, 0x70);
639 if (!card->plx) {
640 printk(KERN_ERR "wanxl: ioremap() failed\n");
641 wanxl_pci_remove_one(pdev);
642 return -EFAULT;
643 }
638 644
639#if RESET_WHILE_LOADING 645#if RESET_WHILE_LOADING
640 wanxl_reset(card); 646 wanxl_reset(card);
@@ -700,6 +706,12 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
700 } 706 }
701 707
702 mem = ioremap_nocache(mem_phy, PDM_OFFSET + sizeof(firmware)); 708 mem = ioremap_nocache(mem_phy, PDM_OFFSET + sizeof(firmware));
709 if (!mem) {
710 printk(KERN_ERR "wanxl: ioremap() failed\n");
711 wanxl_pci_remove_one(pdev);
712 return -EFAULT;
713 }
714
703 for (i = 0; i < sizeof(firmware); i += 4) 715 for (i = 0; i < sizeof(firmware); i += 4)
704 writel(htonl(*(u32*)(firmware + i)), mem + PDM_OFFSET + i); 716 writel(htonl(*(u32*)(firmware + i)), mem + PDM_OFFSET + i);
705 717