summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2021-08-05 19:55:27 +0800
committerDavid S. Miller <davem@davemloft.net>2021-08-05 13:27:50 +0100
commit1160dfa178eb848327e9dec39960a735f4dc1685 (patch)
treeb9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/ipv6/ip6mr.c
parenta85b99ab6abb583e051d266c2138647daa5c0ecc (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/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 06b0d2c329b9..36ed9efb8825 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -559,8 +559,7 @@ static int pim6_rcv(struct sk_buff *skb)
read_lock(&mrt_lock);
if (reg_vif_num >= 0)
reg_dev = mrt->vif_table[reg_vif_num].dev;
- if (reg_dev)
- dev_hold(reg_dev);
+ dev_hold(reg_dev);
read_unlock(&mrt_lock);
if (!reg_dev)