isdn: remove some pointless conditionals before kfree_skb()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 25 Feb 2009 00:12:09 +0000 (00:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2009 07:07:29 +0000 (23:07 -0800)
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>
drivers/isdn/capi/capi.c
drivers/isdn/pcbit/layer2.c

index 1b5bf87c4cf4719cd66e75575d3b97250e368e06..3e468d2cf730b0467c44de5403b4c7efaab58933 100644 (file)
@@ -277,7 +277,7 @@ static void capiminor_free(struct capiminor *mp)
        list_del(&mp->list);
        write_unlock_irqrestore(&capiminor_list_lock, flags);
 
-       if (mp->ttyskb) kfree_skb(mp->ttyskb);
+       kfree_skb(mp->ttyskb);
        mp->ttyskb = NULL;
        skb_queue_purge(&mp->inqueue);
        skb_queue_purge(&mp->outqueue);
index 5ba2a879df1447e42bcead890600ba9c51ed9800..e075e8d2fce044a445720e39f97c61b71870d5f7 100644 (file)
@@ -347,8 +347,7 @@ pcbit_receive(struct pcbit_dev *dev)
                if (dev->read_frame) {
                        printk(KERN_DEBUG "pcbit_receive: Type 0 frame and read_frame != NULL\n");
                        /* discard previous queued frame */
-                       if (dev->read_frame->skb)
-                               kfree_skb(dev->read_frame->skb);
+                       kfree_skb(dev->read_frame->skb);
                        kfree(dev->read_frame);
                        dev->read_frame = NULL;
                }
@@ -601,8 +600,7 @@ pcbit_l2_err_recover(unsigned long data)
        dev->w_busy = dev->r_busy = 1;
 
        if (dev->read_frame) {
-               if (dev->read_frame->skb)
-                       kfree_skb(dev->read_frame->skb);
+               kfree_skb(dev->read_frame->skb);
                kfree(dev->read_frame);
                dev->read_frame = NULL;
        }