]> git.itanic.dy.fi Git - linux-stable/commit
net: remove unnecessary NULL checking in napi_consume_skb()
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 19 Sep 2020 02:24:47 +0000 (10:24 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Sep 2020 21:17:20 +0000 (14:17 -0700)
commit1f14bd99e6d393f55ca5f62dcf7bed0152ec4db6
tree08d23bd43e755327b3aa876c7509ebe58da507f5
parent5273144116d10f66c206a068266584cc60a526ac
net: remove unnecessary NULL checking in napi_consume_skb()

When budget is non-zero, skb_unref() has already handled the
NULL checking.

When budget is zero, the dev_consume_skb_any() has handled NULL
checking in __dev_kfree_skb_irq(), or dev_kfree_skb() which also
ultimately call skb_unref().

So remove the unnecessary checking in napi_consume_skb().

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c