From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
notify@kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: qcom: Initialize offload control return value
Date: Fri, 05 Jun 2026 13:14:52 +0200 [thread overview]
Message-ID: <87y0gttf0z.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260605-alsa-usb-qcom-offload-ret-init-v1-1-dc72fcc4bd3b@gmail.com>
On Fri, 05 Jun 2026 06:14:40 +0200,
Cássio Gabriel wrote:
>
> snd_usb_offload_create_ctl() returns ret after walking the USB PCM list,
> but ret is only assigned after a playback stream passes the endpoint and
> PCM-index filters.
>
> If all playback streams are skipped, for example because there is no
> playback endpoint or because all PCM indexes exceed the 0xff control
> range, the function returns an uninitialized stack value.
>
> Initialize ret to 0 so the no-control-created path returns deterministic
> success, while preserving the existing negative error return when
> snd_ctl_add() fails.
>
> Fixes: a67656f011d1 ("ALSA: usb-audio: qcom: Add USB offload route kcontrol")
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Applied to for-next branch now. Thanks.
Takashi
prev parent reply other threads:[~2026-06-05 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 4:14 [PATCH] ALSA: usb-audio: qcom: Initialize offload control return value Cássio Gabriel
2026-06-05 11:14 ` Takashi Iwai [this message]
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=87y0gttf0z.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=notify@kernel.org \
--cc=perex@perex.cz \
--cc=quic_wcheng@quicinc.com \
--cc=tiwai@suse.com \
/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