]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix smc-mca cleanup breakage
authorJames Bottomley <james.bottomley@steeleye.com>
Thu, 25 Sep 2003 07:41:58 +0000 (00:41 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 25 Sep 2003 07:41:58 +0000 (00:41 -0700)
The latest set of smc-mca fixes broke the driver.  Apparently, it wasn't
realised that request_region() actually returns a pointer to the region
you're requesting if it can.  Without this fix, the smc-mca cannot
attach to any device.

drivers/net/smc-mca.c

index c5a0857073024d7da9df3e02ee286a03cca76a77..b9dc4a31700ecac3908d826d8ec5e9b9c82dd25b 100644 (file)
@@ -269,9 +269,10 @@ int __init ultramca_probe(struct device *gen_dev)
                goto err_unregister_netdev;
        }
 
-       rc = request_region(ioaddr, ULTRA_IO_EXTENT, dev->name);
-       if (rc)
+       if (!request_region(ioaddr, ULTRA_IO_EXTENT, dev->name)) {
+               rc = -ENODEV;
                goto err_unregister_netdev;
+       }
 
        reg4 = inb(ioaddr + 4) & 0x7f;
        outb(reg4, ioaddr + 4);