mISDN: remove redundant null pointer check before kfree_skb
authorzhong jiang <zhongjiang@huawei.com>
Thu, 20 Sep 2018 14:27:28 +0000 (22:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Sep 2018 16:09:22 +0000 (09:09 -0700)
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>
drivers/isdn/mISDN/socket.c

index 18c0a12..15d3ca3 100644 (file)
@@ -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;
 }