patch-2.2.0-pre5 linux/drivers/net/plip.c

Next file: linux/drivers/net/sdla_fr.c
Previous file: linux/drivers/net/acenic_firmware.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre4/linux/drivers/net/plip.c linux/drivers/net/plip.c
@@ -1227,7 +1227,6 @@
 plip_init(void))
 {
 	struct parport *pb = parport_enumerate();
-	int devices=0;
 	int i=0;
 
 	if (parport[0] == -2)
@@ -1238,7 +1237,7 @@
 		timid = 0;
 	}
 
-	/* When user feeds parameters, use them */
+	/* If the user feeds parameters, use them */
 	while (pb) {
 		if ((parport[0] == -1 && (!timid || !pb->devices)) || 
 		    plip_searchfor(parport, i)) {
@@ -1266,14 +1265,13 @@
 				kfree(dev_plip[i]->name);
 				kfree(dev_plip[i]);
 			} else {
-				devices++;
+				i++;
 			}
 		}
-		i++;
 		pb = pb->next;
   	}
 
-	if (devices == 0) {
+	if (i == 0) {
 		printk(KERN_INFO "plip: no devices registered\n");
 		return -EIO;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov