diff options
author | Amol Lad <amol@verismonetworks.com> | 2007-07-17 03:34:36 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-18 10:46:55 +0200 |
commit | 78e4be16e0563bb6bf25c178d1eb2f5f6f622eb2 (patch) | |
tree | 945679de12439e5b9a1efe8cc1a660ef81922e1e /drivers/atm/eni.c | |
parent | [ATM]: [lanai] sram_test_word() must be __devinit (diff) | |
download | linux-78e4be16e0563bb6bf25c178d1eb2f5f6f622eb2.tar.xz linux-78e4be16e0563bb6bf25c178d1eb2f5f6f622eb2.zip |
[ATM]: [drivers] ioremap balanced with iounmap
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/eni.c')
-rw-r--r-- | drivers/atm/eni.c | 19 |
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) printk(KERN_ERR KERN_ERR DEV_LABEL "(itf %d): bad " "magic - expected 0x%x, got 0x%x\n",dev->number, ENI155_MAGIC,(unsigned) readl(&eprom->magic)); - return -EINVAL; + error = -EINVAL; + goto unmap; } } eni_dev->phy = base+PHY_BASE; @@ -1765,17 +1766,27 @@ static int __devinit eni_do_init(struct atm_dev *dev) printk(")\n"); printk(KERN_ERR DEV_LABEL "(itf %d): ERROR - wrong id 0x%x\n", dev->number,(unsigned) eni_in(MID_RES_ID_MCON)); - return -EINVAL; + error = -EINVAL; + goto unmap; } error = eni_dev->asic ? get_esi_asic(dev) : get_esi_fpga(dev,base); - if (error) return error; + if (error) + goto unmap; for (i = 0; i < ESI_LEN; i++) printk("%s%02X",i ? "-" : "",dev->esi[i]); printk(")\n"); printk(KERN_NOTICE DEV_LABEL "(itf %d): %s,%s\n",dev->number, eni_in(MID_RES_ID_MCON) & 0x200 ? "ASIC" : "FPGA", media_name[eni_in(MID_RES_ID_MCON) & DAUGTHER_ID]); - return suni_init(dev); + + error = suni_init(dev); + if (error) + goto unmap; +out: + return error; +unmap: + iounmap(base); + goto out; } |