Skip to contentSkip to conversation

fix smc-mca cleanup breakage

PATCH New James Bottomley 1 participant 1 message Sep 25, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix smc-mca cleanup breakage

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.

James
===== drivers/net/smc-mca.c 1.11 vs edited =====

drivers/net/smc-mca.c +3 -2
@@ -269,9 +269,10 @@
 		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);