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 |
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 --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;
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(-)