netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] pktgen: remove useless assignment
@ 2005-11-02  9:11 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2005-11-02  9:11 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, Alexey Dobriyan

On main codepath pkt_dev is immediately rewritten. On error codepath it isn't
used.

Noticed by Coverity checker.

From: Alexey Dobriyan <adobriyan@gmail.com>

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-vanilla/net/core/pktgen.c
+++ linux-coverity-1762/net/core/pktgen.c
@@ -2882,7 +2882,7 @@ static int pktgen_add_device(struct pktg
 	
 	/* We don't allow a device to be on several threads */
 
-	if( (pkt_dev = __pktgen_NN_threads(ifname, FIND)) == NULL) {
+	if(__pktgen_NN_threads(ifname, FIND) == NULL) {
 						   
 		pkt_dev = kmalloc(sizeof(struct pktgen_dev), GFP_KERNEL);
                 if (!pkt_dev) 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-02  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-02  9:11 [2.6 patch] pktgen: remove useless assignment Adrian Bunk

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