diff options
| -rw-r--r-- | drivers/atm/eni.c | 19 | ||||
| -rw-r--r-- | drivers/atm/firestream.c | 14 |
2 files changed, 24 insertions, 9 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; | ||
| 1785 | out: | ||
| 1786 | return error; | ||
| 1787 | unmap: | ||
| 1788 | iounmap(base); | ||
| 1789 | goto out; | ||
| 1779 | } | 1790 | } |
| 1780 | 1791 | ||
| 1781 | 1792 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 38b688f9f6a9..737cea49f872 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); |
