[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211202075535.34383-1-vulab@iscas.ac.cn>
Date: Thu, 2 Dec 2021 07:55:35 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: jk@...econstruct.com.au, matt@...econstruct.com.au,
davem@...emloft.net, kuba@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
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 <vulab@...as.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
Powered by blists - more mailing lists