summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>2023-09-12 11:42:34 +0300
committerPaolo Abeni <pabeni@redhat.com>2023-09-14 18:20:17 +0300
commita613ed1afd9696ab6d235c0dab5f557863b94bc8 (patch)
treef3c5a25017adabadc8ccb62d1a6248ca84e13bae /net/ipv4
parent4e519fb4ee7b838d46865cdf57b647efcbff42a7 (diff)
downloadlinux-a613ed1afd9696ab6d235c0dab5f557863b94bc8.tar.xz
ipv4: igmp: Remove redundant comparison in igmp_mcf_get_next()
The 'state->im' value will always be non-zero after the 'while' statement, so the check can be removed. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20230912084039.1501984-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/igmp.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 418e5fb58fd3..76c3ea75b8dd 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2944,8 +2944,6 @@ static struct ip_sf_list *igmp_mcf_get_next(struct seq_file *seq, struct ip_sf_l
continue;
state->im = rcu_dereference(state->idev->mc_list);
}
- if (!state->im)
- break;
spin_lock_bh(&state->im->lock);
psf = state->im->sources;
}