patch-2.3.99-pre7 linux/drivers/net/hamradio/bpqether.c

Next file: linux/drivers/net/hamradio/dmascc.c
Previous file: linux/drivers/net/hamradio/baycom_ser_hdx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/hamradio/bpqether.c linux/drivers/net/hamradio/bpqether.c
@@ -496,7 +496,6 @@
 static int bpq_new_device(struct net_device *dev)
 {
 	int k;
-	unsigned char *buf;
 	struct bpqdev *bpq, *bpq2;
 
 	if ((bpq = kmalloc(sizeof(struct bpqdev), GFP_KERNEL)) == NULL)
@@ -513,14 +512,13 @@
 	memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
 
 	dev = &bpq->axdev;
-	buf = kmalloc(14, GFP_KERNEL);
 
 	for (k = 0; k < MAXBPQDEV; k++) {
 		struct net_device *odev;
 
-		sprintf(buf, "bpq%d", k);
+		sprintf(dev->name, "bpq%d", k);
 
-		if ((odev = __dev_get_by_name(buf)) == NULL || bpq_check_devices(odev))
+		if ((odev = __dev_get_by_name(dev->name)) == NULL || bpq_check_devices(odev))
 			break;
 	}
 
@@ -530,7 +528,6 @@
 	}
 
 	dev->priv = (void *)bpq;	/* pointer back */
-	dev->name = buf;
 	dev->init = bpq_dev_init;
 
 	/* We should be locked, call register_netdevice() directly. */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)