wan: remove some pointless conditionals before kfree_skb()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 25 Feb 2009 00:22:41 +0000 (00:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2009 07:07:32 +0000 (23:07 -0800)
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/cosa.c

index 0d7ba117ef608debcafeb4185809a882487d6134..d276d72ee3b78027c2fa09d20fdd34571d6475c0 100644 (file)
@@ -731,8 +731,7 @@ static char *cosa_net_setup_rx(struct channel_data *chan, int size)
         * We can safely fall back to non-dma-able memory, because we have
         * the cosa->bouncebuf pre-allocated.
         */
-       if (chan->rx_skb)
-               kfree_skb(chan->rx_skb);
+       kfree_skb(chan->rx_skb);
        chan->rx_skb = dev_alloc_skb(size);
        if (chan->rx_skb == NULL) {
                printk(KERN_NOTICE "%s: Memory squeeze, dropping packet\n",