From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: <tiwai@suse.com>, <perex@perex.cz>, <amade@asmblr.net>,
<linux-sound@vger.kernel.org>
Subject: Re: [PATCH 05/10] ASoC: Intel: avs: Clean up streams if their initialization fails
Date: Thu, 27 Aug 2026 19:58:01 +0200 [thread overview]
Message-ID: <9488fd22-fbb8-4ec0-bc59-0c92105eda56@intel.com> (raw)
In-Reply-To: <8537fc06-7d8d-4a25-a111-5fb6e6121253@sirena.org.uk>
On 8/27/2026 4:34 PM, Mark Brown wrote:
> On Thu, Aug 27, 2026 at 03:15:05PM +0200, Cezary Rojewski wrote:
>> When streams are being initialized the memory allocation may fail.
>> Have an error path and return early if that is the case.
>
>> +err:
>> + snd_hdac_ext_stream_free_all(bus);
>> + return ret;
>
> I think this needs a snd_hdac_bus_free_stream_pages(), or possibly that
> should be pulled inside the cleanup.
I agree, snd_hdac_bus_alloc_stream_pages() situation does not look
clean. However, I'm leaning towards adding an error path to said function.
If a call to snd_hdac_bus_alloc_stream_pages() fails, I'd expect BDLs,
bus->rb and bus->posbuf invalidated before the function leaves its scope.
That asks for a separate patch.
next prev parent reply other threads:[~2026-08-27 17:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 13:15 [PATCH 00/10] ALSA/ASoC: Intel: avs: HDAudio bus and general fixes Cezary Rojewski
2026-08-27 13:15 ` [PATCH 01/10] ALSA: hda: ext: Clean up links if their initialization fails Cezary Rojewski
2026-08-27 13:15 ` [PATCH 02/10] ALSA: hda: ext: Clean up streams " Cezary Rojewski
2026-08-27 13:15 ` [PATCH 03/10] ASoC: Intel: avs: Clean up the bus when its " Cezary Rojewski
2026-08-27 13:15 ` [PATCH 04/10] ASoC: Intel: avs: Clean up the bus when fetching ML caps fails Cezary Rojewski
2026-08-27 13:15 ` [PATCH 05/10] ASoC: Intel: avs: Clean up streams if their initialization fails Cezary Rojewski
2026-08-27 14:34 ` Mark Brown
2026-08-27 17:58 ` Cezary Rojewski [this message]
2026-08-27 13:15 ` [PATCH 06/10] ASoC: Intel: avs: Do not ignore -ENOENT when loading a topology Cezary Rojewski
2026-08-27 13:15 ` [PATCH 07/10] ASoC: Intel: avs: Cancel d0ix_work asynchrounously during recovery Cezary Rojewski
2026-08-27 13:15 ` [PATCH 08/10] ASoC: Intel: avs: Fix unbalanced module reference count Cezary Rojewski
2026-08-27 13:15 ` [PATCH 09/10] ASoC: Intel: avs: Refactor and fix init_config access Cezary Rojewski
2026-08-27 14:40 ` Mark Brown
2026-08-27 17:44 ` Cezary Rojewski
2026-08-27 13:15 ` [PATCH 10/10] ASoC: Intel: avs: hda: Constrain MSBs on startup Cezary Rojewski
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=9488fd22-fbb8-4ec0-bc59-0c92105eda56@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--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