[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210330125539.1049093-1-yangyingliang@huawei.com>
Date: Tue, 30 Mar 2021 20:55:39 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <netdev@...r.kernel.org>
CC: <davem@...emloft.net>
Subject: [PATCH -next] 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@...wei.com>
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
drivers/net/mhi/net.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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);
}
--
2.25.1
Powered by blists - more mailing lists