Message ID | 20210330125539.1049093-1-yangyingliang@huawei.com |
---|---|
State | New |
Headers | show |
Series | [-next] net: mhi: remove pointless conditional before kfree_skb() | expand |
diff --git a/drivers/net/mhi/net.c b/drivers/net/mhi/net.c index f59960876083..8b44c674db1b 100644 --- a/drivers/net/mhi/net.c +++ b/drivers/net/mhi/net.c @@ -359,8 +359,7 @@ static void mhi_net_remove(struct mhi_device *mhi_dev) mhi_unprepare_from_transfer(mhi_netdev->mdev); - if (mhi_netdev->skbagg_head) - kfree_skb(mhi_netdev->skbagg_head); + kfree_skb(mhi_netdev->skbagg_head); free_netdev(mhi_netdev->ndev); }
It already has null pointer check in kfree_skb(), remove pointless pointer check before kfree_skb(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/mhi/net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)