Thread (4 messages) 4 messages, 2 authors, 2026-03-10

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

flat view

From: Takashi Iwai <hidden>
Date: 2026-03-10 15:07:44
Also in: linux-sound, lkml, stable

On Tue, 10 Mar 2026 11:29:20 +0100,
Thorsten Blum wrote:
quoted hunk ↗ jump to hunk
--- 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help