* [PATCH -next] net: mhi: remove pointless conditional before kfree_skb()
@ 2021-03-30 12:55 Yang Yingliang
2021-03-30 20:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-30 12:55 UTC (permalink / raw)
To: netdev; +Cc: davem
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net: mhi: remove pointless conditional before kfree_skb()
2021-03-30 12:55 [PATCH -next] net: mhi: remove pointless conditional before kfree_skb() Yang Yingliang
@ 2021-03-30 20:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-30 20:50 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, davem
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 30 Mar 2021 20:55:39 +0800 you wrote:
> 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(-)
Here is the summary with links:
- [-next] net: mhi: remove pointless conditional before kfree_skb()
https://git.kernel.org/netdev/net-next/c/cda1893e9f7c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-30 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 12:55 [PATCH -next] net: mhi: remove pointless conditional before kfree_skb() Yang Yingliang
2021-03-30 20:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).