diff mbox series

mctp: Remove redundant if statements

Message ID 20211202075535.34383-1-vulab@iscas.ac.cn (mailing list archive)
State Accepted
Commit d9e56d1839fa40dbaab640ec205390826bddf8ae
Delegated to: Netdev Maintainers
Headers show
Series mctp: Remove redundant if statements | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 15 this patch: 15
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 20 this patch: 20
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 6 this patch: 6
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Xu Wang Dec. 2, 2021, 7:55 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 2, 2021, 1:20 p.m. UTC | #1
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!
diff mbox series

Patch

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;