[alsa-devel] [PATCH 21/31] ASoC: dapm: Use WARN_ON() instead of BUG_ON()

Mark Brown broonie at kernel.org
Wed Nov 6 11:24:31 CET 2013


On Tue, Nov 05, 2013 at 06:40:08PM +0100, Takashi Iwai wrote:

>  	list_for_each_entry(w, pending, power_list) {
> -		BUG_ON(reg != w->reg);
> +		if (WARN_ON(reg != w->reg))
> +			return;
>  		w->power = w->new_power;

This doesn't seem at all sensible - it's going to suddenly abort the
entire sequence run over the error which if we're actually trying to
continue is just going to make things worse.  I'd expect to at most skip
over the entry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131106/d4014503/attachment.sig>


More information about the Alsa-devel mailing list