summaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-02-25 03:12:09 +0300
committerDavid S. Miller <davem@davemloft.net>2009-02-27 10:07:29 +0300
commitd46604e178f01305e63564864517926bb752d4a3 (patch)
treef13a4eae40dc7ef6b84f72efebb2af636063b53a /drivers/isdn
parente44578ea7c4f87462e05e0d0a2dd43b6beecd5f6 (diff)
downloadlinux-d46604e178f01305e63564864517926bb752d4a3.tar.xz
isdn: remove some pointless conditionals before kfree_skb()
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>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/capi.c2
-rw-r--r--drivers/isdn/pcbit/layer2.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 1b5bf87c4cf4..3e468d2cf730 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -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);
diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c
index 5ba2a879df14..e075e8d2fce0 100644
--- a/drivers/isdn/pcbit/layer2.c
+++ b/drivers/isdn/pcbit/layer2.c
@@ -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;
}