From: Takashi Iwai <tiwai@suse.de>
To: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Cc: perex@perex.cz, tiwai@suse.com,
andriy.shevchenko@linux.intel.com, phasta@kernel.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: lx6464es: fix a error handling in lx_hardware_open()
Date: Mon, 26 Jan 2026 09:39:49 +0100 [thread overview]
Message-ID: <87pl6wbwdm.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260126011854.2447350-1-lihaoxiang@isrc.iscas.ac.cn>
On Mon, 26 Jan 2026 02:18:54 +0100,
Haoxiang Li wrote:
>
> In lx_hardware_open(), if lx_set_granularity() fails,
> call lx_pipe_release() to release the resoueces.
>
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Thanks for the patch. But beware that this isn't about the kernel
resource allocation or free, but rather the manipulation of the
chip-inside configuration. So there is no memory leak or such.
And, this doesn't look like the only place that leads to the
unbalanced / unexpected configuration, and we might need to address
all...
Takashi
> ---
> sound/pci/lx6464es/lx6464es.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c
> index 96df00db51d5..af8d614381b5 100644
> --- a/sound/pci/lx6464es/lx6464es.c
> +++ b/sound/pci/lx6464es/lx6464es.c
> @@ -113,6 +113,7 @@ static int lx_hardware_open(struct lx6464es *chip,
> if (err < 0) {
> dev_err(chip->card->dev, "setting granularity to %ld failed\n",
> period_size);
> + lx_pipe_release(chip, 0, is_capture);
> return err;
> }
>
> --
> 2.25.1
>
prev parent reply other threads:[~2026-01-26 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 1:18 [PATCH] ALSA: lx6464es: fix a error handling in lx_hardware_open() Haoxiang Li
2026-01-26 8:39 ` 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=87pl6wbwdm.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phasta@kernel.org \
--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