]> 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)
commit761092062eb48b760fc46cb14e553b153c47ffd7
tree08d23bd43e755327b3aa876c7509ebe58da507f5
parent7a59ff9acc5515c4a015521cfbe3b20e93955e6f
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