]> git.baikalelectronics.ru Git - kernel.git/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)
commitb82cda8c58fb95ae7142742f3a9c037ca61eaf15
tree08d23bd43e755327b3aa876c7509ebe58da507f5
parentd86df76c84cf643db6382f7734105d019e6d036b
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