WSL2-Linux-Kernel/sound/pci/aw2
Takashi Iwai 3a943321c3 ALSA: aw2: Fix the missing snd_card_free() call at probe error
commit bf4067e8a1 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() manually on the error
from the probe callback.

Fixes: 33631012cd ("ALSA: aw2: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220412102636.16000-32-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:05 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
aw2-alsa.c ALSA: aw2: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:05 +02:00
aw2-saa7146.c ALSA: pci/aw2-saa7146: remove 'set but not used' warning 2020-07-07 12:05:14 +02:00
aw2-saa7146.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 456 2019-06-19 17:09:09 +02:00
aw2-tsl.c ALSA: aw2: More constifications 2020-01-05 16:15:06 +01:00
saa7146.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 456 2019-06-19 17:09:09 +02:00