Commit d46604e1 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

isdn: remove some pointless conditionals before kfree_skb()

Remove some pointless conditionals before kfree_skb().
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e44578ea
...@@ -277,7 +277,7 @@ static void capiminor_free(struct capiminor *mp) ...@@ -277,7 +277,7 @@ static void capiminor_free(struct capiminor *mp)
list_del(&mp->list); list_del(&mp->list);
write_unlock_irqrestore(&capiminor_list_lock, flags); write_unlock_irqrestore(&capiminor_list_lock, flags);
if (mp->ttyskb) kfree_skb(mp->ttyskb); kfree_skb(mp->ttyskb);
mp->ttyskb = NULL; mp->ttyskb = NULL;
skb_queue_purge(&mp->inqueue); skb_queue_purge(&mp->inqueue);
skb_queue_purge(&mp->outqueue); skb_queue_purge(&mp->outqueue);
......
...@@ -347,8 +347,7 @@ pcbit_receive(struct pcbit_dev *dev) ...@@ -347,8 +347,7 @@ pcbit_receive(struct pcbit_dev *dev)
if (dev->read_frame) { if (dev->read_frame) {
printk(KERN_DEBUG "pcbit_receive: Type 0 frame and read_frame != NULL\n"); printk(KERN_DEBUG "pcbit_receive: Type 0 frame and read_frame != NULL\n");
/* discard previous queued frame */ /* 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); kfree(dev->read_frame);
dev->read_frame = NULL; dev->read_frame = NULL;
} }
...@@ -601,8 +600,7 @@ pcbit_l2_err_recover(unsigned long data) ...@@ -601,8 +600,7 @@ pcbit_l2_err_recover(unsigned long data)
dev->w_busy = dev->r_busy = 1; dev->w_busy = dev->r_busy = 1;
if (dev->read_frame) { 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); kfree(dev->read_frame);
dev->read_frame = NULL; dev->read_frame = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment