[Patch] Remove useless check in drivers/net/pcmcia/xirc2ps_cs.c

From: Eric Sesterhenn
Date: Wed Jun 21 2006 - 10:09:34 EST


hi,

coverity choked at this check (id #223), assuming that
skb might be NULL and used anyways later. Since
start_hard_xmit() always gets called with a valid
skb, the check is useless and this patch removes it.

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>

--- linux-2.6.17-git2/drivers/net/pcmcia/xirc2ps_cs.c.orig 2006-06-21 16:06:48.000000000 +0200
+++ linux-2.6.17-git2/drivers/net/pcmcia/xirc2ps_cs.c 2006-06-21 16:06:59.000000000 +0200
@@ -1359,7 +1359,7 @@ do_start_xmit(struct sk_buff *skb, struc
kio_addr_t ioaddr = dev->base_addr;
int okay;
unsigned freespace;
- unsigned pktlen = skb? skb->len : 0;
+ unsigned pktlen = skb->len;

DEBUG(1, "do_start_xmit(skb=%p, dev=%p) len=%u\n",
skb, dev, pktlen);


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