linux-stable/sound/pci
Richard Fitzgerald 9054c474f9 ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance
[ Upstream commit d344873c4c ]

The cs_dsp instance is initialized in the driver probe() so it
should be freed in the driver remove(). Also fix a missing call
to cs_dsp_remove() in the error path of cs35l56_hda_common_probe().

The call to cs_dsp_remove() was being done in the component unbind
callback cs35l56_hda_unbind(). This meant that if the driver was
unbound and then re-bound it would be using an uninitialized cs_dsp
instance.

It is best to initialize the cs_dsp instance in probe() so that it
can return an error if it fails. The component binding API doesn't
have any error handling so there's no way to handle a failure if
cs_dsp was initialized in the bind.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 73cfbfa9ca ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
Link: https://lore.kernel.org/r/20240508100811.49514-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:12:45 +02:00
..
ac97 ALSA: ac97: Fix possible error value of *rac97 2023-08-24 10:02:01 +02:00
ali5451
asihpi ALSA: asihpi: Remove unused declarations 2023-08-18 15:42:06 +02:00
au88x0
aw2
ca0106 ALSA: ca0106: Use the standard snd_ctl_add_followers() helper 2023-07-21 09:37:48 +02:00
cs46xx ALSA: cs46xx: Simplify with snd_ctl_find_id_mixer() 2023-07-21 09:10:39 +02:00
cs5535audio
ctxfi
echoaudio
emu10k1 ALSA: emu10k1: make E-MU FPGA writes potentially more reliable 2024-06-12 11:11:27 +02:00
hda ALSA: hda: cs35l56: Fix lifetime of cs_dsp instance 2024-06-12 11:12:45 +02:00
ice1712 ALSA: ice1712: Use the standard snd_ctl_add_followers() helper 2023-07-21 09:37:49 +02:00
korg1212 ALSA: korg1212: Convert to generic PCM copy ops 2023-08-18 12:18:20 +02:00
lola
lx6464es
mixart ALSA: mixart: Replace one-element arrays with simple object declarations 2023-05-20 10:17:53 +02:00
nm256 ALSA: nm256: Convert to generic PCM copy ops 2023-08-18 12:18:21 +02:00
oxygen ALSA: oxygen: Fix right channel of capture volume mixer 2024-01-25 15:35:44 -08:00
pcxhr
riptide ALSA: riptide: Fix -Wformat-truncation warning for longname string 2023-09-15 13:23:06 +02:00
rme9652 ALSA: rme9652: Convert to generic PCM copy ops 2023-08-18 12:18:24 +02:00
trident
vx222
ymfpci ALSA: ymfpci: Fix the missing snd_card_free() call at probe error 2023-08-23 18:17:33 +02:00
ad1889.c
ad1889.h
ak4531_codec.c
als300.c
als4000.c
atiixp.c
atiixp_modem.c
azt3328.c
azt3328.h
bt87x.c
cmipci.c ALSA: cmipci: Fix -Wformat-truncation warning 2023-09-15 13:22:16 +02:00
cs4281.c
cs5530.c
ens1370.c
ens1371.c
es1938.c ALSA: es1938: Convert to generic PCM copy ops 2023-08-18 12:18:19 +02:00
es1968.c ALSA: es1968: Simplify with snd_ctl_find_id_mixer() 2023-07-21 09:10:41 +02:00
fm801.c
intel8x0.c
intel8x0m.c
Kconfig ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
maestro3.c ALSA: maestro3: Simplify with snd_ctl_find_id_mixer() 2023-07-21 09:10:42 +02:00
Makefile
rme32.c ALSA: rme32: Convert to generic PCM copy ops 2023-08-18 12:18:21 +02:00
rme96.c ALSA: rme96: Convert to generic PCM copy ops 2023-08-18 12:18:22 +02:00
sis7019.c
sis7019.h
sonicvibes.c
via82xx.c ALSA: via82xx: Simplify with snd_ctl_find_id_mixer() 2023-07-21 09:10:43 +02:00
via82xx_modem.c