[PATCH] Trivial: check_region cleanup from drivers/char/ip2main.c

Rusty Russell (rusty@rustcorp.com.au)
Mon, 27 May 2002 12:24:47 +1000


johnpol@2ka.mipt.ru: 40) request_region check, 31-40:
You say, i'm frezy :)

Please test and apply.

Evgeniy Polyakov ( s0mbre )

--- trivial-2.5.18/drivers/char/ip2main.c.orig Mon May 27 12:07:37 2002
+++ trivial-2.5.18/drivers/char/ip2main.c Mon May 27 12:07:37 2002
@@ -1002,12 +1002,10 @@
printk(KERN_INFO "IP2: Board %d: addr=0x%x irq=%d\n", boardnum + 1,
ip2config.addr[boardnum], ip2config.irq[boardnum] );

- if (0 != ( rc = check_region( ip2config.addr[boardnum], 8))) {
- printk(KERN_ERR "IP2: bad addr=0x%x rc = %d\n",
- ip2config.addr[boardnum], rc );
+ if (!request_region( ip2config.addr[boardnum], 8, pcName )) {
+ printk(KERN_ERR "IP2: bad addr=0x%x\n", ip2config.addr[boardnum]);
goto err_initialize;
}
- request_region( ip2config.addr[boardnum], 8, pcName );

if ( iiDownloadAll ( pB, (loadHdrStrPtr)Fip_firmware, 1, Fip_firmware_size )
!= II_DOWN_GOOD ) {

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/