can: remove some pointless conditionals before kfree_skb()
Wei Yongjun [Wed, 25 Feb 2009 00:35:44 +0000 (00:35 +0000)]
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

net/can/af_can.c

index d90e8dd..547bafc 100644 (file)
@@ -273,8 +273,7 @@ int can_send(struct sk_buff *skb, int loop)
                err = net_xmit_errno(err);
 
        if (err) {
-               if (newskb)
-                       kfree_skb(newskb);
+               kfree_skb(newskb);
                return err;
        }