* [PATCH] mctp: Remove redundant if statements
@ 2021-12-02 7:55 Xu Wang
2021-12-02 13:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2021-12-02 7:55 UTC (permalink / raw)
To: jk, matt, davem, kuba; +Cc: netdev, linux-kernel
The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mctp: Remove redundant if statements
2021-12-02 7:55 [PATCH] mctp: Remove redundant if statements Xu Wang
@ 2021-12-02 13:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-02 13:20 UTC (permalink / raw)
To: Xu Wang; +Cc: jk, matt, davem, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
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 <vulab@iscas.ac.cn>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-02 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 7:55 [PATCH] mctp: Remove redundant if statements Xu Wang
2021-12-02 13:20 ` 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