]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ipv4: igmp: Remove redundant comparison in igmp_mcf_get_next()
authorGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Tue, 12 Sep 2023 08:42:34 +0000 (08:42 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Sep 2023 15:20:17 +0000 (17:20 +0200)
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>
net/ipv4/igmp.c

index 418e5fb58fd3f2443f3c88fde5c0776805a832ef..76c3ea75b8ddc03f5d5e7d2494e12de80250bfdc 100644 (file)
@@ -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;
        }