WSL2-Linux-Kernel/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
..
Makefile
au88x0.c ALSA: au88x0: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:05 +02:00
au88x0.h
au88x0_a3d.c ALSA: au88x0: Fix assignment in if condition 2021-06-09 17:30:03 +02:00
au88x0_a3d.h
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
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
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
au8810.c
au8810.h
au8820.c
au8820.h
au8830.c
au8830.h