[TRIVIAL] 15) request_region check, 11-20

Rusty Trivial Russell
2003-06-23T06:47:29Z

--- trivial-2.4.22-pre1/drivers/acorn/scsi/cumana_2.c.orig 2003-06-23 16:39:45.000000000 +1000
+++ trivial-2.4.22-pre1/drivers/acorn/scsi/cumana_2.c 2003-06-23 16:39:45.000000000 +1000
@@ -382,8 +382,13 @@
ecs[count]->irq_data = (void *)info->alatch;
ecs[count]->ops = (expansioncard_ops_t *)&cumanascsi_2_ops;

- request_region(host->io_port + CUMANASCSI2_FAS216_OFFSET,
- 16 << CUMANASCSI2_FAS216_SHIFT, "cumanascsi2-fas");
+ if (!request_region(host->io_port + CUMANASCSI2_FAS216_OFFSET,
+ 16 << CUMANASCSI2_FAS216_SHIFT, "cumanascsi2-fas")) {
+ scsi_unregister(host);
+ ecard_release(ecs[count]);
+ break;
+ }
+

if (host->irq != NO_IRQ &&
request_irq(host->irq, cumanascsi_2_intr,
--
What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/