public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* baycom_par dereference before check.
@ 2004-04-16 21:20 Dave Jones
  2004-04-16 21:25 ` viro
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Jones @ 2004-04-16 21:20 UTC (permalink / raw)
  To: jgarzik; +Cc: Linux Kernel


--- linux-2.6.5/drivers/net/hamradio/baycom_par.c~	2004-04-16 22:18:53.000000000 +0100
+++ linux-2.6.5/drivers/net/hamradio/baycom_par.c	2004-04-16 22:19:33.000000000 +0100
@@ -272,9 +272,13 @@
 static void par96_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *)dev_id;
-	struct baycom_state *bc = netdev_priv(dev);
+	struct baycom_state *bc;
 
-	if (!dev || !bc || bc->hdrv.magic != HDLCDRV_MAGIC)
+	if (!dev)
+		return;
+
+	bc = netdev_priv(dev);
+	if (!bc || bc->hdrv.magic != HDLCDRV_MAGIC)
 		return;
 
 	baycom_int_freq(bc);

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

end of thread, other threads:[~2004-04-19 16:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 21:20 baycom_par dereference before check Dave Jones
2004-04-16 21:25 ` viro
2004-04-16 21:27   ` Dave Jones
2004-04-16 21:48     ` Jeff Garzik
2004-04-16 21:53       ` Dave Jones
2004-04-16 23:07         ` Chris Wright
2004-04-16 23:40           ` Jeff Garzik
2004-04-19 16:39         ` Jeff Garzik

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