WSL2-Linux-Kernel/sound/pci/aw2
Takashi Iwai bf4067e8a1 ALSA: aw2: 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() 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>
2022-04-12 17:58:38 +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-12 17:58:38 +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