WSL2-Linux-Kernel/sound/pci/au88x0
Takashi Iwai b093de145b ALSA: au88x0: 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() 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>
2022-04-12 17:58:21 +02:00
..
Makefile
au88x0.c ALSA: au88x0: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:21 +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
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
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
au88x0_xtalk.h
au8810.c
au8810.h
au8820.c
au8820.h
au8830.c
au8830.h