[PATCH] ALSA: aoa: Handle empty codec list in i2sbus_pcm_prepare()
Takashi Iwai
tiwai at suse.de
Mon Mar 9 22:59:55 AEDT 2026
On Mon, 09 Mar 2026 12:41:59 +0100,
Thorsten Blum wrote:
>
> Replace two list_for_each_entry() loops with list_first_entry_or_null()
> in i2sbus_pcm_prepare().
Hmm, I guess both can be simply list_first_entry(), as the codec list
in this code path is guaranteed to be non-empty (it's called after
i2sbus_pcm_open() which has the check of the valid codecs).
> Handle an empty codec list explicitly by returning -ENODEV, which avoids
> using uninitialized 'bi.sysclock_factor' in the 32-bit code path.
Which 32bit code path are you referring to...?
thanks,
Takashi
More information about the Linuxppc-dev
mailing list