Message ID | 20210330125539.1049093-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cda1893e9f7c1d78e391dbb6ef1798cd32354113 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] net: mhi: remove pointless conditional before kfree_skb() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 2 maintainers not CCed: loic.poulain@linaro.org kuba@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
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
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(-)