Re: [TRIVIAL] 16) request_region check, 11-20

Alan Cox
2003-06-27T12:42:13Z

On Llu, 2003-06-23 at 08:00, Rusty Trivial Russell wrote:
> --- trivial-2.4.22-pre1/drivers/acorn/scsi/oak.c.orig 2003-06-23 16:39:46.000000000 +1000
> +++ trivial-2.4.22-pre1/drivers/acorn/scsi/oak.c 2003-06-23 16:39:46.000000000 +1000
> @@ -134,7 +134,8 @@
> ecard_claim(ecs[count]);
>
> instance->n_io_port = 255;
> - request_region (instance->io_port, instance->n_io_port, "Oak SCSI");
> + if (!request_region (instance->io_port, instance->n_io_port, "Oak SCSI"))
> + break;
>

Doesn't clean up the register etc - so clearly wrong. Actually I suspect
what needs doing is to request_region first, then register then _check_
the scsi_register return (it doesnt) and unregister the region.