All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Zhao Dongdong <winter91@foxmail.com>
Cc: perex@perex.cz, tiwai@suse.com, joakim.zhang@cixtech.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhao Dongdong <zhaodongdong@kylinos.cn>
Subject: Re: [PATCH v2] ALSA: hda/core: add cleanup in snd_hdac_bus_alloc_stream_pages()
Date: Tue, 07 Jul 2026 16:16:31 +0200	[thread overview]
Message-ID: <8733xu7um8.wl-tiwai@suse.de> (raw)
In-Reply-To: <tencent_8E5BBBD19D53B1EFCDB6E89F3B6246A70B06@qq.com>

On Tue, 07 Jul 2026 04:11:39 +0200,
Zhao Dongdong wrote:
> 
> From: Zhao Dongdong <zhaodongdong@kylinos.cn>
> 
> The current error handling in snd_hdac_bus_alloc_stream_pages()
> returns directly on failure without cleaning up already allocated
> resources. While callers are supposed to release those via
> snd_hdac_bus_free_stream_pages() at destructor, adding explicit
> cleanup makes the function more self-contained and safer against
> future misuse.
> 
> Add proper error cleanup path using goto labels to free previously
> allocated BDL DMA buffers, position buffer, and ring buffer in
> reverse allocation order.
> 
> Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
> ---
> v2: Update subject and description.
> v1: https://lore.kernel.org/all/87pl108lp1.wl-tiwai@suse.de/

Applied now to for-next branch.  Thanks.


Takashi

      reply	other threads:[~2026-07-07 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07  2:11 [PATCH v2] ALSA: hda/core: add cleanup in snd_hdac_bus_alloc_stream_pages() Zhao Dongdong
2026-07-07 14:16 ` 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=8733xu7um8.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=joakim.zhang@cixtech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=winter91@foxmail.com \
    --cc=zhaodongdong@kylinos.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.