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

From: Takashi Iwai <[email-masked]>
Date: Tue, 10 Mar 2026 16:07:26 +0100

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.

  	int err, ret = 0;
  
 +	if (list_empty(&i2sdev->sound.codec_list))
 +		return 0;
 +
  	list_for_each_entry(i2sdev, &control->list, item) {
  		/* reset i2s bus format etc. */
  		i2sbus_pcm_prepare_both(i2sdev);

thanks,

Takashi