Subject: Re: [PATCH v2] ALSA: aoa: Skip devices with no codecs in i2sbus_resume()

From: Takashi Iwai <[email-masked]>
Date: Tue, 10 Mar 2026 18:21:00 +0100

On Tue, 10 Mar 2026 17:30:01 +0100,
Thorsten Blum wrote:
> 
> On 10. Mar 2026, at 16:07, Takashi Iwai wrote:
> > On Tue, 10 Mar 2026 11:29:20 +0100, Thorsten Blum wrote:
> >> --- a/sound/aoa/soundbus/i2sbus/core.c
> >> +++ b/sound/aoa/soundbus/i2sbus/core.c
> >> @@ -405,6 +405,9 @@ static int i2sbus_resume(struct macio_dev* dev)
> >> 	int err, ret = 0;
> >> 
> >> 	list_for_each_entry(i2sdev, &control->list, item) {
> >> +		if (list_empty(&i2sdev->sound.codec_list))
> >> +			continue;
> > 
> > This can be even outside the loop and immediately return 0, as the
> > remaining part is also the loop of codec_list.
> 
> The i2sdev pointer is only assigned by the outer list_for_each_entry(),
> which iterates the controller's device list. Since each device has its
> own codec list, list_empty(&i2sdev->sound.codec_list) must be checked
> inside the loop; before the loop i2sdev is uninitialized.

Ah indeed.  Now I applied to for-next branch.

thanks,

Takashi