diff options
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r-- | drivers/net/tokenring/tmspci.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index 5f601773c260..e2150b3c83d9 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c | |||
@@ -121,11 +121,6 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
121 | goto err_out_trdev; | 121 | goto err_out_trdev; |
122 | } | 122 | } |
123 | 123 | ||
124 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, | ||
125 | dev->name, dev); | ||
126 | if (ret) | ||
127 | goto err_out_region; | ||
128 | |||
129 | dev->base_addr = pci_ioaddr; | 124 | dev->base_addr = pci_ioaddr; |
130 | dev->irq = pci_irq_line; | 125 | dev->irq = pci_irq_line; |
131 | dev->dma = 0; | 126 | dev->dma = 0; |
@@ -142,7 +137,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
142 | ret = tmsdev_init(dev, &pdev->dev); | 137 | ret = tmsdev_init(dev, &pdev->dev); |
143 | if (ret) { | 138 | if (ret) { |
144 | printk("%s: unable to get memory for dev->priv.\n", dev->name); | 139 | printk("%s: unable to get memory for dev->priv.\n", dev->name); |
145 | goto err_out_irq; | 140 | goto err_out_region; |
146 | } | 141 | } |
147 | 142 | ||
148 | tp = netdev_priv(dev); | 143 | tp = netdev_priv(dev); |
@@ -157,6 +152,11 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
157 | 152 | ||
158 | tp->tmspriv = cardinfo; | 153 | tp->tmspriv = cardinfo; |
159 | 154 | ||
155 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, | ||
156 | dev->name, dev); | ||
157 | if (ret) | ||
158 | goto err_out_tmsdev; | ||
159 | |||
160 | dev->open = tms380tr_open; | 160 | dev->open = tms380tr_open; |
161 | dev->stop = tms380tr_close; | 161 | dev->stop = tms380tr_close; |
162 | pci_set_drvdata(pdev, dev); | 162 | pci_set_drvdata(pdev, dev); |
@@ -164,15 +164,15 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
164 | 164 | ||
165 | ret = register_netdev(dev); | 165 | ret = register_netdev(dev); |
166 | if (ret) | 166 | if (ret) |
167 | goto err_out_tmsdev; | 167 | goto err_out_irq; |
168 | 168 | ||
169 | return 0; | 169 | return 0; |
170 | 170 | ||
171 | err_out_irq: | ||
172 | free_irq(pdev->irq, dev); | ||
171 | err_out_tmsdev: | 173 | err_out_tmsdev: |
172 | pci_set_drvdata(pdev, NULL); | 174 | pci_set_drvdata(pdev, NULL); |
173 | tmsdev_term(dev); | 175 | tmsdev_term(dev); |
174 | err_out_irq: | ||
175 | free_irq(pdev->irq, dev); | ||
176 | err_out_region: | 176 | err_out_region: |
177 | release_region(pci_ioaddr, TMS_PCI_IO_EXTENT); | 177 | release_region(pci_ioaddr, TMS_PCI_IO_EXTENT); |
178 | err_out_trdev: | 178 | err_out_trdev: |