mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ALSA: ice1712: Fix the error handling via auto-cleanup at probe
We used the auto-cleanup via snd_card_unref() for errors at probe of
ice1712 driver, but this may be problematic in a subtle way when an
error happens at snd_card_register(); since snd_card_unref() skips the
snd_card_disconnect() call, it may miss some resource clearance.
For fixing the issue, use the new __free(snd_card_free) instead, which
does call snd_card_free() explicitly at errors for avoiding such a
pitfall.
Fixes: d736eba9c4 ("ALSA: ice1712: Fix the card leak at probe error with the auto-cleanup")
Link: https://patch.msgid.link/20261001151039.592033-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
f1d565dc92
commit
e6229c0402
|
|
@ -2523,7 +2523,7 @@ static int snd_ice1712_probe(struct pci_dev *pci,
|
|||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
struct snd_card *card __free(snd_card_unref) = NULL;
|
||||
struct snd_card *card __free(snd_card_free) = NULL;
|
||||
struct snd_ice1712 *ice;
|
||||
int pcm_dev = 0, err;
|
||||
const struct snd_ice1712_card_info * const *tbl, *c;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user