net: mhi: remove pointless conditional before kfree_skb()

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yang Yingliang 2021-03-30 20:55:39 +08:00 committed by David S. Miller
parent 1c137d4777
commit cda1893e9f
1 changed files with 1 additions and 2 deletions

View File

@ -361,8 +361,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);
}