acrn-kernel/sound/pci/cs46xx
Takashi Iwai c5e58c4545 ALSA: cs46xx: Fix 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() manually on the error
from the probe callback.

Fixes: 5bff69b364 ("ALSA: cs46xx: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Jan Engelhardt <jengelh@inai.de>
Link: https://lore.kernel.org/r/p2p1s96o-746-74p4-s95-61qo1p7782pn@vanv.qr
Link: https://lore.kernel.org/r/20220705152336.350-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-07-05 17:24:05 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cs46xx.c ALSA: cs46xx: Fix missing snd_card_free() call at probe error 2022-07-05 17:24:05 +02:00
cs46xx.h ALSA: cs46xx: Allocate resources with device-managed APIs 2021-07-19 16:16:54 +02:00
cs46xx_dsp_scb_types.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cs46xx_dsp_spos.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cs46xx_dsp_task_types.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cs46xx_lib.c ALSA: pci: cs46xx: Fix set up buffer type properly 2021-08-09 10:04:05 +02:00
cs46xx_lib.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dsp_spos.c ALSA: cs46xx: Fix assignment in if condition 2021-06-09 17:30:06 +02:00
dsp_spos.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dsp_spos_scb_lib.c ALSA: pci: delete repeated words in comments 2020-08-06 09:30:02 +02:00