summaryrefslogtreecommitdiff
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2021-08-05 14:55:27 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-05 15:27:50 +0300
commit1160dfa178eb848327e9dec39960a735f4dc1685 (patch)
treeb9e62879f43f63602da7a68c20d8e58a5acf79f3 /net/ipv4/icmp.c
parenta85b99ab6abb583e051d266c2138647daa5c0ecc (diff)
downloadlinux-1160dfa178eb848327e9dec39960a735f4dc1685.tar.xz
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/icmp.c')
-rw-r--r--net/ipv4/icmp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index c695d294a5df..8b30cadff708 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1095,8 +1095,7 @@ bool icmp_build_probe(struct sk_buff *skb, struct icmphdr *icmphdr)
sizeof(struct in6_addr))
goto send_mal_query;
dev = ipv6_stub->ipv6_dev_find(net, &iio->ident.addr.ip_addr.ipv6_addr, dev);
- if (dev)
- dev_hold(dev);
+ dev_hold(dev);
break;
#endif
default: