2021-12-02 07:56:22

by Xu Wang

[permalink] [raw]
Subject: [PATCH] mctp: Remove redundant if statements

The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.

Signed-off-by: Xu Wang <[email protected]>
---
net/mctp/route.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mctp/route.c b/net/mctp/route.c
index 46c44823edb7..b89fda2c230e 100644
--- a/net/mctp/route.c
+++ b/net/mctp/route.c
@@ -892,8 +892,7 @@ int mctp_local_output(struct sock *sk, struct mctp_route *rt,
if (!ext_rt)
mctp_route_release(rt);

- if (dev)
- dev_put(dev);
+ dev_put(dev);

return rc;

--
2.25.1



2021-12-02 13:21:12

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] mctp: Remove redundant if statements

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Thu, 2 Dec 2021 07:55:35 +0000 you wrote:
> The 'if (dev)' statement already move into dev_{put , hold}, so remove
> redundant if statements.
>
> Signed-off-by: Xu Wang <[email protected]>
> ---
> net/mctp/route.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- mctp: Remove redundant if statements
https://git.kernel.org/netdev/net-next/c/d9e56d1839fa

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html