diff options
author | Amol Lad <amol@verismonetworks.com> | 2007-07-16 21:34:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-18 04:46:55 -0400 |
commit | 78e4be16e0563bb6bf25c178d1eb2f5f6f622eb2 (patch) | |
tree | 945679de12439e5b9a1efe8cc1a660ef81922e1e /drivers/atm/firestream.c | |
parent | de24a193124e40fc4f23160336982de1565d51fc (diff) |
[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/firestream.c')
-rw-r--r-- | drivers/atm/firestream.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 38b688f9f6a..737cea49f87 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -1710,7 +1710,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1710 | /* This bit is documented as "RESERVED" */ | 1710 | /* This bit is documented as "RESERVED" */ |
1711 | if (isr & ISR_INIT_ERR) { | 1711 | if (isr & ISR_INIT_ERR) { |
1712 | printk (KERN_ERR "Error initializing the FS... \n"); | 1712 | printk (KERN_ERR "Error initializing the FS... \n"); |
1713 | return 1; | 1713 | goto unmap; |
1714 | } | 1714 | } |
1715 | if (isr & ISR_INIT) { | 1715 | if (isr & ISR_INIT) { |
1716 | fs_dprintk (FS_DEBUG_INIT, "Ha! Initialized OK!\n"); | 1716 | fs_dprintk (FS_DEBUG_INIT, "Ha! Initialized OK!\n"); |
@@ -1723,7 +1723,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1723 | 1723 | ||
1724 | if (!to) { | 1724 | if (!to) { |
1725 | printk (KERN_ERR "timeout initializing the FS... \n"); | 1725 | printk (KERN_ERR "timeout initializing the FS... \n"); |
1726 | return 1; | 1726 | goto unmap; |
1727 | } | 1727 | } |
1728 | 1728 | ||
1729 | /* XXX fix for fs155 */ | 1729 | /* XXX fix for fs155 */ |
@@ -1803,7 +1803,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1803 | if (!dev->atm_vccs) { | 1803 | if (!dev->atm_vccs) { |
1804 | printk (KERN_WARNING "Couldn't allocate memory for VCC buffers. Woops!\n"); | 1804 | printk (KERN_WARNING "Couldn't allocate memory for VCC buffers. Woops!\n"); |
1805 | /* XXX Clean up..... */ | 1805 | /* XXX Clean up..... */ |
1806 | return 1; | 1806 | goto unmap; |
1807 | } | 1807 | } |
1808 | 1808 | ||
1809 | dev->tx_inuse = kzalloc (dev->nchannels / 8 /* bits/byte */ , GFP_KERNEL); | 1809 | dev->tx_inuse = kzalloc (dev->nchannels / 8 /* bits/byte */ , GFP_KERNEL); |
@@ -1813,7 +1813,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1813 | if (!dev->tx_inuse) { | 1813 | if (!dev->tx_inuse) { |
1814 | printk (KERN_WARNING "Couldn't allocate memory for tx_inuse bits!\n"); | 1814 | printk (KERN_WARNING "Couldn't allocate memory for tx_inuse bits!\n"); |
1815 | /* XXX Clean up..... */ | 1815 | /* XXX Clean up..... */ |
1816 | return 1; | 1816 | goto unmap; |
1817 | } | 1817 | } |
1818 | /* -- RAS1 : FS155 and 50 differ. Default (0) should be OK for both */ | 1818 | /* -- RAS1 : FS155 and 50 differ. Default (0) should be OK for both */ |
1819 | /* -- RAS2 : FS50 only: Default is OK. */ | 1819 | /* -- RAS2 : FS50 only: Default is OK. */ |
@@ -1840,7 +1840,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1840 | if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) { | 1840 | if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) { |
1841 | printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); | 1841 | printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); |
1842 | /* XXX undo all previous stuff... */ | 1842 | /* XXX undo all previous stuff... */ |
1843 | return 1; | 1843 | goto unmap; |
1844 | } | 1844 | } |
1845 | fs_dprintk (FS_DEBUG_INIT, "Grabbed irq %d for dev at %p.\n", dev->irq, dev); | 1845 | fs_dprintk (FS_DEBUG_INIT, "Grabbed irq %d for dev at %p.\n", dev->irq, dev); |
1846 | 1846 | ||
@@ -1890,6 +1890,9 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1890 | 1890 | ||
1891 | func_exit (); | 1891 | func_exit (); |
1892 | return 0; | 1892 | return 0; |
1893 | unmap: | ||
1894 | iounmap(dev->base); | ||
1895 | return 1; | ||
1893 | } | 1896 | } |
1894 | 1897 | ||
1895 | static int __devinit firestream_init_one (struct pci_dev *pci_dev, | 1898 | static int __devinit firestream_init_one (struct pci_dev *pci_dev, |
@@ -2012,6 +2015,7 @@ static void __devexit firestream_remove_one (struct pci_dev *pdev) | |||
2012 | for (i=0;i < FS_NR_RX_QUEUES;i++) | 2015 | for (i=0;i < FS_NR_RX_QUEUES;i++) |
2013 | free_queue (dev, &dev->rx_rq[i]); | 2016 | free_queue (dev, &dev->rx_rq[i]); |
2014 | 2017 | ||
2018 | iounmap(dev->base); | ||
2015 | fs_dprintk (FS_DEBUG_ALLOC, "Free fs-dev: %p\n", dev); | 2019 | fs_dprintk (FS_DEBUG_ALLOC, "Free fs-dev: %p\n", dev); |
2016 | nxtdev = dev->next; | 2020 | nxtdev = dev->next; |
2017 | kfree (dev); | 2021 | kfree (dev); |