aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/eni.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm/eni.c')
-rw-r--r--drivers/atm/eni.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 77637e780d41..41b2204ebc6e 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -1738,7 +1738,8 @@ static int __devinit eni_do_init(struct atm_dev *dev)
1738 printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad " 1738 printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad "
1739 "magic - expected 0x%x, got 0x%x\n",dev->number, 1739 "magic - expected 0x%x, got 0x%x\n",dev->number,
1740 ENI155_MAGIC,(unsigned) readl(&eprom->magic)); 1740 ENI155_MAGIC,(unsigned) readl(&eprom->magic));
1741 return -EINVAL; 1741 error = -EINVAL;
1742 goto unmap;
1742 } 1743 }
1743 } 1744 }
1744 eni_dev->phy = base+PHY_BASE; 1745 eni_dev->phy = base+PHY_BASE;
@@ -1765,17 +1766,27 @@ static int __devinit eni_do_init(struct atm_dev *dev)
1765 printk(")\n"); 1766 printk(")\n");
1766 printk(KERN_ERR DEV_LABEL "(itf %d): ERROR - wrong id 0x%x\n", 1767 printk(KERN_ERR DEV_LABEL "(itf %d): ERROR - wrong id 0x%x\n",
1767 dev->number,(unsigned) eni_in(MID_RES_ID_MCON)); 1768 dev->number,(unsigned) eni_in(MID_RES_ID_MCON));
1768 return -EINVAL; 1769 error = -EINVAL;
1770 goto unmap;
1769 } 1771 }
1770 error = eni_dev->asic ? get_esi_asic(dev) : get_esi_fpga(dev,base); 1772 error = eni_dev->asic ? get_esi_asic(dev) : get_esi_fpga(dev,base);
1771 if (error) return error; 1773 if (error)
1774 goto unmap;
1772 for (i = 0; i < ESI_LEN; i++) 1775 for (i = 0; i < ESI_LEN; i++)
1773 printk("%s%02X",i ? "-" : "",dev->esi[i]); 1776 printk("%s%02X",i ? "-" : "",dev->esi[i]);
1774 printk(")\n"); 1777 printk(")\n");
1775 printk(KERN_NOTICE DEV_LABEL "(itf %d): %s,%s\n",dev->number, 1778 printk(KERN_NOTICE DEV_LABEL "(itf %d): %s,%s\n",dev->number,
1776 eni_in(MID_RES_ID_MCON) & 0x200 ? "ASIC" : "FPGA", 1779 eni_in(MID_RES_ID_MCON) & 0x200 ? "ASIC" : "FPGA",
1777 media_name[eni_in(MID_RES_ID_MCON) & DAUGTHER_ID]); 1780 media_name[eni_in(MID_RES_ID_MCON) & DAUGTHER_ID]);
1778 return suni_init(dev); 1781
1782 error = suni_init(dev);
1783 if (error)
1784 goto unmap;
1785out:
1786 return error;
1787unmap:
1788 iounmap(base);
1789 goto out;
1779} 1790}
1780 1791
1781 1792