[PATCH] mctp: Remove redundant if statements

Subsystems: management component transport protocol (mctp), networking [general], the rest

STALE1780d

2 messages, 2 authors, 2021-12-02 · open the first message on its own page

[PATCH] mctp: Remove redundant if statements

From: Xu Wang <hidden>
Date: 2021-12-02 07:56:22

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

Signed-off-by: Xu Wang <redacted>
---
 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

Re: [PATCH] mctp: Remove redundant if statements

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-02 13:21:12

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller [off-list ref]:

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 <redacted>
---
 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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help