Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
* [PATCH] 6pack reinit bug
@ 2004-02-11 22:25 Jeroen Vreeken
  2004-02-18 23:50 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Vreeken @ 2004-02-11 22:25 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-hams

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Hi,

This patch is the same as to mkiss a while ago, the current code triggers a
bug when reattaching a network device.

Please apply.

Thanks,
Jeroen

[-- Attachment #2: hamradio.2.6.1.rxq3.diff --]
[-- Type: application/octet-stream, Size: 1115 bytes --]

--- linux-2.6.1-rxq2/drivers/net/hamradio/6pack.c	2004-01-21 20:47:09.000000000 +0100
+++ linux-2.6.1-rxq3/drivers/net/hamradio/6pack.c	2004-02-06 19:32:46.000000000 +0100
@@ -178,17 +178,17 @@
 	    (sixpack_ctrls[i] = (sixpack_ctrl_t *)kmalloc(sizeof(sixpack_ctrl_t),
 						    GFP_KERNEL)) != NULL) {
 		spp = sixpack_ctrls[i];
-		memset(spp, 0, sizeof(sixpack_ctrl_t));
-
-		/* Initialize channel control data */
-		set_bit(SIXPF_INUSE, &spp->ctrl.flags);
-		spp->ctrl.tty         = NULL;
-		sprintf(spp->dev.name, "sp%d", i);
-		spp->dev.base_addr    = i;
-		spp->dev.priv         = (void *) &spp->ctrl;
-		spp->dev.next         = NULL;
-		spp->dev.init         = sixpack_init;
 	}
+	memset(spp, 0, sizeof(sixpack_ctrl_t));
+
+	/* Initialize channel control data */
+	set_bit(SIXPF_INUSE, &spp->ctrl.flags);
+	spp->ctrl.tty         = NULL;
+	sprintf(spp->dev.name, "sp%d", i);
+	spp->dev.base_addr    = i;
+	spp->dev.priv         = (void *) &spp->ctrl;
+	spp->dev.next         = NULL;
+	spp->dev.init         = sixpack_init;
 
 	if (spp != NULL) {
 		/* register device so that it can be ifconfig'ed       */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-18 23:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 22:25 [PATCH] 6pack reinit bug Jeroen Vreeken
2004-02-18 23:50 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox