linux-stable/sound/pci/au88x0
Takashi Iwai 811a92b866 ALSA: au88x0: Fix the missing snd_card_free() call at probe error
commit b093de145b 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: e44b5b4406 ("ALSA: au88x0: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220412102636.16000-8-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
..
au88x0.c ALSA: au88x0: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:05 +02:00
au88x0.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 130 2019-05-30 11:25:14 -07:00
au88x0_a3d.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_a3d.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 130 2019-05-30 11:25:14 -07:00
au88x0_a3ddata.c ALSA: pci/au88x0: remove "defined but not used" warnings 2020-07-07 12:13:39 +02:00
au88x0_core.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_eq.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_eq.h
au88x0_eqdata.c ALSA: au88x0: More constifications 2020-01-05 16:14:38 +01:00
au88x0_game.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
au88x0_mixer.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_mpu401.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_pcm.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_synth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 130 2019-05-30 11:25:14 -07:00
au88x0_wt.h
au88x0_xtalk.c ALSA: pci/au88x0: remove "defined but not used" warnings 2020-07-07 12:13:39 +02:00
au88x0_xtalk.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 130 2019-05-30 11:25:14 -07:00
au8810.c
au8810.h
au8820.c
au8820.h
au8830.c
au8830.h
Makefile