WSL2-Linux-Kernel/sound/pci/echoaudio
Takashi Iwai 2a2a75ebdb ALSA: echoaudio: Fix the missing snd_card_free() call at probe error
commit 313c7e5703 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: 9c211bf392 ("ALSA: echoaudio: Allocate resources with device-managed APIs")
Reported-and-tested-by: Zheyu Ma <zheyuma97@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAMhUBjm2AdyEZ_-EgexdNDN7SvY4f89=4=FwAL+c0Mg0O+X50A@mail.gmail.com
Link: https://lore.kernel.org/r/20220412093141.8008-3-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:06 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
darla20.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
darla20_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
darla24.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
darla24_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
echo3g.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
echo3g_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
echoaudio.c ALSA: echoaudio: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:06 +02:00
echoaudio.h ALSA: echoaudio: Allocate resources with device-managed APIs 2021-07-19 16:16:55 +02:00
echoaudio_3g.c ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
echoaudio_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
echoaudio_dsp.h ALSA: echoaudio: Proper endian notations 2018-07-27 09:06:09 +02:00
echoaudio_gml.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
gina20.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
gina20_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
gina24.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
gina24_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
indigo.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
indigo_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
indigo_express_dsp.c ALSA: echoaudio: remove all snd_printk 2014-11-03 14:07:25 +01:00
indigodj.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
indigodj_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
indigodjx.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
indigodjx_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
indigoio.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
indigoio_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
indigoiox.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
indigoiox_dsp.c ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
layla20.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
layla20_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
layla24.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
layla24_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
mia.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
mia_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
midi.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00
mona.c ALSA: pci: Constify snd_pcm_hardware definitions 2020-01-03 09:23:47 +01:00
mona_dsp.c ALSA: echoaudio: Fix assignment in if condition 2021-06-09 17:30:08 +02:00