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>
        ssize_t ret = 0;
 
        if (!iov_iter_count(to)) {
-               if (skb)
-                       kfree_skb(skb);
+               kfree_skb(skb);
                return 0;
        }
 
        struct sk_buff *skb = m->msg_control;
        int ret;
        if (flags & ~(MSG_DONTWAIT|MSG_TRUNC)) {
-               if (skb)
-                       kfree_skb(skb);
+               kfree_skb(skb);
                return -EINVAL;
        }
        ret = tap_do_read(q, &m->msg_iter, flags & MSG_DONTWAIT, skb);