LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6 patch] drivers/net/ns83820.c: fix a check-after-use
@ 2007-07-01 20:21 Adrian Bunk
  2007-07-02 12:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-07-01 20:21 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, linux-kernel

This patch fixes a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/drivers/net/ns83820.c.old	2007-06-29 22:12:22.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/net/ns83820.c	2007-06-29 22:13:59.000000000 +0200
@@ -1985,11 +1985,13 @@ static int __devinit ns83820_init_one(st
 
 	ndev = alloc_etherdev(sizeof(struct ns83820));
 	dev = PRIV(ndev);
-	dev->ndev = ndev;
+
 	err = -ENOMEM;
 	if (!dev)
 		goto out;
 
+	dev->ndev = ndev;
+
 	spin_lock_init(&dev->rx_info.lock);
 	spin_lock_init(&dev->tx_lock);
 	spin_lock_init(&dev->misc_lock);


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

* Re: [2.6 patch] drivers/net/ns83820.c: fix a check-after-use
  2007-07-01 20:21 [2.6 patch] drivers/net/ns83820.c: fix a check-after-use Adrian Bunk
@ 2007-07-02 12:26 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-07-02 12:26 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: netdev, linux-kernel

Adrian Bunk wrote:
> This patch fixes a check-after-use spotted by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

applied



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

end of thread, other threads:[~2007-07-02 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-01 20:21 [2.6 patch] drivers/net/ns83820.c: fix a check-after-use Adrian Bunk
2007-07-02 12:26 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).