make drivers/scsi/a3000.c check request_irq (240p3)
PATCH 1/1 make drivers/scsi/a3000.c check request_irq (240p3)
Hi.
(I cannot seem to find a maintainer for this code.)
The following patch makes drivers/scsi/a3000.c check the return from request_irq. Applies cleanly against 2.4.0 and ac9.
Comments?
drivers/scsi/a3000.c renamed from drivers/scsi/a3000.c.org +5 -2
@@ -194,8 +194,11 @@DMA (a3000_host)->DAWR =DAWR_A3000 ;wd33c93_init (a3000_host, (wd33c93_regs *)&(DMA (a3000_host)->SASR), dma_setup, dma_stop,WD33C93_FS_12_15 ); -request_irq (IRQ_AMIGA_PORTS , a3000_intr,SA_SHIRQ ,"A3000 SCSI" , - a3000_intr); +if (!request_irq (IRQ_AMIGA_PORTS , a3000_intr,SA_SHIRQ ,"A3000 SCSI" , + a3000_intr)) { +release_mem_region (0xDD0000 ,256 ); +return 0 ; + }DMA (a3000_host)->CNTR =CNTR_PDMD |CNTR_INTEN ; called =1 ;
Signature · 9 lines
Regards,
Rasmus([email protected])
"No man is genuinely happy, married, who has to drink worse whiskey than he
used to drink when he was single." H.L. Mencken
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/Quoted 2 lines · Rasmus Andersen
Comments?
Well, Hans Grobler had some. the patch below tries to accommodate them by adding scsi_unregister() and wd33c93_release() to the earlier patch. Sorry for the multiple mailings.
(Any other) comments? :)
drivers/scsi/a3000.c renamed from drivers/scsi/a3000.c.org +7 -2
@@ -194,8 +194,13 @@DMA (a3000_host)->DAWR =DAWR_A3000 ;wd33c93_init (a3000_host, (wd33c93_regs *)&(DMA (a3000_host)->SASR), dma_setup, dma_stop,WD33C93_FS_12_15 ); -request_irq (IRQ_AMIGA_PORTS , a3000_intr,SA_SHIRQ ,"A3000 SCSI" , - a3000_intr); +if (!request_irq (IRQ_AMIGA_PORTS , a3000_intr,SA_SHIRQ ,"A3000 SCSI" , + a3000_intr)) { +wd33c93_release (); +scsi_unregister (a3000_host); +release_mem_region (0xDD0000 ,256 ); +return 0 ; + }DMA (a3000_host)->CNTR =CNTR_PDMD |CNTR_INTEN ; called =1 ;
Signature · 10 lines
Rasmus([email protected]) A chicken and an egg are lying in bed. The chicken is smoking a cigarette with a satisfied smile on it's face and the egg is frowning and looking a bit pissed off. The egg mutters, to no-one in particular, "Well, I guess we answered THAT question..." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/