From: Takashi Iwai <tiwai@suse.de>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v2] ALSA: ice1712: Fix the card leak at probe error with the auto-cleanup
Date: Thu, 20 Aug 2026 10:55:09 +0200 [thread overview]
Message-ID: <87jyplmas2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260820014117.14044-1-vulab@iscas.ac.cn>
On Thu, 20 Aug 2026 03:41:17 +0200,
Haotian Zhang wrote:
>
> snd_ice1712_probe() performs multiple initialization steps after
> snd_card_new(), but directly returns on failures from later steps
> without releasing the ALSA card, causing resource leaks when
> probing fails.
>
> Use snd_devm_card_new() together with scope-based cleanup
> via __free(snd_card_unref), and clear the card pointer after
> successful registration to keep it alive.
>
> Fixes: ca642da4b33d ("ALSA: ice1712: Allocate resources with device-managed APIs")
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-08-20 8:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 8:49 [PATCH] ALSA: ice1712: Fix missing snd_card_free() at probe error Haotian Zhang
2026-08-19 12:53 ` Takashi Iwai
2026-08-19 13:47 ` Takashi Iwai
2026-08-20 1:41 ` [PATCH v2] ALSA: ice1712: Fix the card leak at probe error with the auto-cleanup Haotian Zhang
2026-08-20 8:55 ` 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=87jyplmas2.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=vulab@iscas.ac.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.