From: Thorsten Blum <thorsten.blum@linux.dev>
To: Takashi Iwai <tiwai@suse.de>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kees Cook <kees@kernel.org>,
stable@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: aoa: Skip devices with no codecs in i2sbus_resume()
Date: Tue, 10 Mar 2026 17:30:01 +0100 [thread overview]
Message-ID: <933E291B-23F2-4144-80F0-EC5730F65B75@linux.dev> (raw)
In-Reply-To: <878qbzradt.wl-tiwai@suse.de>
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.
Thanks,
Thorsten
next prev parent reply other threads:[~2026-03-10 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 10:29 [PATCH v2] ALSA: aoa: Skip devices with no codecs in i2sbus_resume() Thorsten Blum
2026-03-10 15:07 ` Takashi Iwai
2026-03-10 16:30 ` Thorsten Blum [this message]
2026-03-10 17:21 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=933E291B-23F2-4144-80F0-EC5730F65B75@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox