summaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-20 17:27:28 +0300
committerDavid S. Miller <davem@davemloft.net>2018-09-21 19:09:22 +0300
commit66ab23598696072c19344591f8d9846332e66e23 (patch)
treea45d86dadbd10bab9f2c5269e962281684f348db /drivers/isdn
parent8a1aff144d37af492034a9a11a8c6ad3b687a441 (diff)
downloadlinux-66ab23598696072c19344591f8d9846332e66e23.tar.xz
mISDN: remove redundant null pointer check before kfree_skb
kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 18c0a1281914..15d3ca37669a 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -236,8 +236,7 @@ mISDN_sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
}
done:
- if (skb)
- kfree_skb(skb);
+ kfree_skb(skb);
release_sock(sk);
return err;
}