diff options
author | Yajun Deng <yajun.deng@linux.dev> | 2021-08-05 19:55:27 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-05 13:27:50 +0100 |
commit | 1160dfa178eb848327e9dec39960a735f4dc1685 (patch) | |
tree | b9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/ipv4/fib_semantics.c | |
parent | a85b99ab6abb583e051d266c2138647daa5c0ecc (diff) |
net: Remove redundant if statements
The 'if (dev)' statement already move into dev_{put , hold}, so remove
redundant if statements.
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index f29feb7772da..b42c429cebbe 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -208,9 +208,7 @@ static void rt_fibinfo_free_cpus(struct rtable __rcu * __percpu *rtp) void fib_nh_common_release(struct fib_nh_common *nhc) { - if (nhc->nhc_dev) - dev_put(nhc->nhc_dev); - + dev_put(nhc->nhc_dev); lwtstate_put(nhc->nhc_lwtstate); rt_fibinfo_free_cpus(nhc->nhc_pcpu_rth_output); rt_fibinfo_free(&nhc->nhc_rth_input); |