diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/a2091.c | 18 | ||||
-rw-r--r-- | drivers/scsi/gvp11.c | 8 |
2 files changed, 18 insertions, 8 deletions
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 07d572feceed..37dd47136fb1 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c | |||
@@ -169,10 +169,8 @@ int __init a2091_detect(struct scsi_host_template *tpnt) | |||
169 | continue; | 169 | continue; |
170 | 170 | ||
171 | instance = scsi_register (tpnt, sizeof (struct WD33C93_hostdata)); | 171 | instance = scsi_register (tpnt, sizeof (struct WD33C93_hostdata)); |
172 | if (instance == NULL) { | 172 | if (instance == NULL) |
173 | release_mem_region(address, 256); | 173 | goto release; |
174 | continue; | ||
175 | } | ||
176 | instance->base = ZTWO_VADDR(address); | 174 | instance->base = ZTWO_VADDR(address); |
177 | instance->irq = IRQ_AMIGA_PORTS; | 175 | instance->irq = IRQ_AMIGA_PORTS; |
178 | instance->unique_id = z->slotaddr; | 176 | instance->unique_id = z->slotaddr; |
@@ -183,10 +181,18 @@ int __init a2091_detect(struct scsi_host_template *tpnt) | |||
183 | HDATA(instance)->fast = 0; | 181 | HDATA(instance)->fast = 0; |
184 | HDATA(instance)->dma_mode = CTRL_DMA; | 182 | HDATA(instance)->dma_mode = CTRL_DMA; |
185 | wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); | 183 | wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); |
186 | request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI", | 184 | if (request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI", |
187 | instance); | 185 | instance)) |
186 | goto unregister; | ||
188 | DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; | 187 | DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; |
189 | num_a2091++; | 188 | num_a2091++; |
189 | continue; | ||
190 | |||
191 | unregister: | ||
192 | scsi_unregister(instance); | ||
193 | wd33c93_release(); | ||
194 | release: | ||
195 | release_mem_region(address, 256); | ||
190 | } | 196 | } |
191 | 197 | ||
192 | return num_a2091; | 198 | return num_a2091; |
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index ca7363752401..5d1bf7e3d245 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c | |||
@@ -329,12 +329,16 @@ int __init gvp11_detect(struct scsi_host_template *tpnt) | |||
329 | (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 | 329 | (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 |
330 | : WD33C93_FS_12_15); | 330 | : WD33C93_FS_12_15); |
331 | 331 | ||
332 | request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI", | 332 | if (request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI", |
333 | instance); | 333 | instance)) |
334 | goto unregister; | ||
334 | DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; | 335 | DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; |
335 | num_gvp11++; | 336 | num_gvp11++; |
336 | continue; | 337 | continue; |
337 | 338 | ||
339 | unregister: | ||
340 | scsi_unregister(instance); | ||
341 | wd33c93_release(); | ||
338 | release: | 342 | release: |
339 | release_mem_region(address, 256); | 343 | release_mem_region(address, 256); |
340 | } | 344 | } |