ipv6: mcast: Remove redundant comparison in igmp6_mcf_get_next()
authorGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Tue, 12 Sep 2023 08:42:49 +0000 (08:42 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Sep 2023 15:20:35 +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.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230912084100.1502379-1-Ilia.Gavrilov@infotecs.ru
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv6/mcast.c

index 5ce25bcb9974de97f26635d0d3d54695af3070a7..421264a69e972e1ddae67b4aaee4f83a2b2e7e09 100644 (file)
@@ -3011,8 +3011,6 @@ static struct ip6_sf_list *igmp6_mcf_get_next(struct seq_file *seq, struct ip6_s
                                continue;
                        state->im = rcu_dereference(state->idev->mc_list);
                }
-               if (!state->im)
-                       break;
                psf = rcu_dereference(state->im->mca_sources);
        }
 out: