linux-stable/sound/pci/emu10k1
Takashi Iwai f37019b6bf ALSA: emu10k1x: Fix the missing snd_card_free() call at probe error
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>
2022-04-12 17:58:24 +02:00
..
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu10k1_synth_local.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu10k1x.c ALSA: emu10k1x: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:24 +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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
p17v.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer.c ALSA: emu10k1: Fix assignment in if condition 2021-06-09 17:30:11 +02:00
tina2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
voice.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00