WSL2-Linux-Kernel/sound/pci/emu10k1
Takashi Iwai 0d52c09f0c ALSA: emu10k1x: Fix the missing snd_card_free() call at probe error
commit f37019b6bf upstream.

The previous cleanup with devres may lead to the incorrect release
orders at the probe error handling due to the devres's nature.  Until
we register the card, snd_card_free() has to be called at first for
releasing the stuff properly when the driver tries to manage and
release the stuff via card->private_free().

This patch fixes it by calling snd_card_free() on the error from the
probe callback using a new helper function.

Fixes: 2b377c6b60 ("ALSA: emu10k1x: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220412102636.16000-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:34:06 +02:00
..
Makefile
emu10k1.c ALSA: emu10k1: Allocate resources with device-managed APIs 2021-07-19 16:16:56 +02:00
emu10k1_callback.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
emu10k1_main.c ALSA: emu10k1: Allocate resources with device-managed APIs 2021-07-19 16:16:56 +02:00
emu10k1_patch.c ALSA: pci/emu10k1: remove 'set but not used' warning 2020-07-07 12:09:45 +02:00
emu10k1_synth.c
emu10k1_synth_local.h
emu10k1x.c ALSA: emu10k1x: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:06 +02:00
emufx.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
emumixer.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
emumpu401.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
emupcm.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
emuproc.c ALSA: emu10k1: More constifications 2020-01-05 16:14:39 +01:00
io.c ALSA: emu10k1: More constifications 2020-01-05 16:14:39 +01:00
irq.c
memory.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
p16v.c ALSA: emu10k1: Allocate resources with device-managed APIs 2021-07-19 16:16:56 +02:00
p16v.h
p17v.h
timer.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
tina2.h
voice.c