[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkHi98GDDWNie7GP@sirena.org.uk>
Date: Mon, 28 Mar 2022 17:31:51 +0100
From: Mark Brown <broonie@...nel.org>
To: Xiaomeng Tong <xiam0nd.tong@...il.com>
Cc: lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] soc: soc-dapm: fix two incorrect uses of list iterator
On Sun, Mar 27, 2022 at 04:21:38PM +0800, Xiaomeng Tong wrote:
> case snd_soc_dapm_pre:
> - if (!w->event)
> + if (!w->event) {
> list_for_each_entry_safe_continue(w, n, list,
> power_list);
> + break;
> + }
This doesn't make much sense. The intent here seems to clearly be to
continue; the loop but this doesn't do that - instead it appears that
continue doesn't actually do the equivalent of a continue but rather
skips over an entry. This should instead be replaced with a plain
continue statement.
THe naming of _continue() needs fixing I think - it's just asking to be
a bug. Fortunately there's very few users.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists