[2.6 patch] pktgen: remove useless assignment

From: Adrian Bunk
Date: Wed Nov 02 2005 - 04:11:29 EST


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

Noticed by Coverity checker.

From: Alexey Dobriyan <adobriyan@xxxxxxxxx>

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/