diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-03-30 20:55:39 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-30 13:47:28 -0700 |
commit | cda1893e9f7c1d78e391dbb6ef1798cd32354113 (patch) | |
tree | 32bdbc9c3f80a95e989734b3ccf237df20a89220 /drivers | |
parent | 1c137d4777b5b66c64854ba469ab0650ff0dc5bd (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mhi/net.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mhi/net.c b/drivers/net/mhi/net.c index 5ec7a29f668d..0d8293a47a56 100644 --- a/drivers/net/mhi/net.c +++ b/drivers/net/mhi/net.c @@ -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); } |