Commit a613ed1a authored by Gavrilov Ilia's avatar Gavrilov Ilia Committed by Paolo Abeni
Browse files

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: default avatarGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230912084039.1501984-1-Ilia.Gavrilov@infotecs.ru


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 4e519fb4
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
	}