[alsa-devel] [PATCH 4/7] ASoC: soc-pcm: goto error after trying for_each_rtd_codec_dai

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Jan 29 01:15:48 CET 2020


Hi

> > I also cringed on the bit-OR'ed error codes, but I saw it's already
> > used in soc-pcm.c so thought it was an agreed precedent?
> > 
> > 		ret |= snd_soc_component_close(component, substream);
> > 		ret |= snd_soc_component_hw_free(component, substream);
> 
> I think it's just an overlook.  The driver may return arbitrary error
> codes so they can conflict.  The bit-OR works only if the return code
> is always consistent.

OK. Let's cleanup it, too.
If you ara OK, I will do it.

> I also don't like the idea of not stopping loops on errors, or
> releasing things that haven't been properly allocated. It does
> simplify error handling but it's asking for trouble.

Actually, my local patch which will be posted will solve it.
I will re-order patch-set, and post it.

# But, this re-order patch will have conflict in my local tree.
# I will solve it, too.

Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list