[2.6 patch] drivers/net/ns83820.c: fix a check-after-use

STALE6988d

2 messages, 2 authors, 2007-07-02 · open the first message on its own page

[2.6 patch] drivers/net/ns83820.c: fix a check-after-use

From: Adrian Bunk <hidden>
Date: 2007-07-01 20:22:29

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

Signed-off-by: Adrian Bunk <redacted>

---
--- 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);

Re: [2.6 patch] drivers/net/ns83820.c: fix a check-after-use

From: Jeff Garzik <hidden>
Date: 2007-07-02 12:26:41

Adrian Bunk wrote:
This patch fixes a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <redacted>
applied

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help