release_region in cciss block driver
PATCH 1/1 release_region in cciss block driver
Hi Andrew, Patch against 2.6.0-test6. Release a previous requested region if we're about the fail the board
initialization. Found by smatch.
Please review and consider applying,
Thanks.
Felipe
drivers/block/cciss.c renamed from drivers/block/cciss.c.orig +1 -0
@@ -2185,6 +2185,7 @@schedule_timeout (HZ /10 );/* wait 100ms */ }if (scratchpad !=CCISS_FIRMWARE_READY ) { +release_io_mem (c);printk (KERN_WARNING "cciss: Board not ready. Timed out.\n" );return -1 ; }
Quoted 16 lines · Felipe W Damasio
Hi Andrew,
Patch against 2.6.0-test6.
Release a previous requested region if we're about the fail the board initialization. Found by smatch.
Please review and consider applying,
Thanks.
Felipe
drivers/block/cciss.c line 2191
Quoted 7 lines
drivers/block/cciss.c renamed from drivers/block/cciss.c.orig +1
-0@@ -2185,6 +2185,7 @@schedule_timeout (HZ /10 );/* wait 100ms */ }if (scratchpad !=CCISS_FIRMWARE_READY ) { +release_io_mem (c);printk (KERN_WARNING "cciss: Board not ready. Timed out.\n" );return -1 ; }
Please at least try and follow the local style when you make changes.
Signature · 1 line
Jens Axboe
Quoted 1 line · Jens Axboe
Please at least try and follow the local style when you make changes.
Right, sorry.
Andrew, please use this patch instead.
Felipe
drivers/block/cciss.c renamed from drivers/block/cciss.c.orig +1 -0
@@ -2185,6 +2185,7 @@schedule_timeout (HZ /10 );/* wait 100ms */ }if (scratchpad !=CCISS_FIRMWARE_READY ) { +release_io_mem (c);printk (KERN_WARNING "cciss: Board not ready. Timed out.\n" );return -1 ; }
Quoted 11 lines · Felipe W Damasio
--- linux-2.6.0-test6/drivers/block/cciss.c.orig 2003-10-06 10:18:01.000000000 -0300
+++linux-2.6.0-test6/drivers/block/cciss.c2003-10-06 10:25:04.000000000 -0300
@@ -2185,6 +2185,7 @@
schedule_timeout(HZ / 10); /* wait 100ms */
}
if (scratchpad !=CCISS_FIRMWARE_READY) {
+release_io_mem(c);
printk(KERN_WARNING "cciss: Board not ready. Timed out.\n"); return -1;
}
It seems to me that the driver is already performing this function in the caller.
static int __devinit cciss_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
...
if (cciss_pci_init(hba[i], pdev) != 0)
goto clean1;
...
clean1:
release_io_mem(hba[i]);
free_hba(i);
return(-1);
}