linux-stable/sound/pci
Su Hui ead753019e ALSA: ac97: Fix possible error value of *rac97
[ Upstream commit 67de40c9df ]

Before committing 79597c8bf6, *rac97 always be NULL if there is
an error. When error happens, make sure *rac97 is NULL is safer.

For examble, in snd_vortex_mixer():
	err = snd_ac97_mixer(pbus, &ac97, &vortex->codec);
	vortex->isquad = ((vortex->codec == NULL) ?
		0 : (vortex->codec->ext_id&0x80));
If error happened but vortex->codec isn't NULL, this may cause some
problems.

Move the judgement order to be clearer and better.

Fixes: 79597c8bf6 ("ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer")
Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20230823025212.1000961-1-suhui@nfschina.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:46:56 +02:00
..
ac97 ALSA: ac97: Fix possible error value of *rac97 2023-09-23 10:46:56 +02:00
ali5451
asihpi ALSA: asihpi: check pao in control_message() 2023-04-05 11:14:19 +02:00
au88x0
aw2
ca0106
cs46xx
cs5535audio
ctxfi
echoaudio
emu10k1 ALSA: emu10k1: roll up loops in DSP setup code for Audigy 2023-08-30 16:35:08 +02:00
hda ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table 2023-05-30 12:38:36 +01:00
ice1712 ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() 2023-03-11 16:26:47 +01:00
korg1212
lola
lx6464es
mixart
nm256
oxygen
pcxhr
riptide
rme9652
trident
vx222
ymfpci
Kconfig
Makefile
ad1889.c
ad1889.h
ak4531_codec.c
als300.c
als4000.c
atiixp.c
atiixp_modem.c
azt3328.c
azt3328.h
bt87x.c
cmipci.c
cs4281.c
cs5530.c
ens1370.c
ens1371.c
es1938.c
es1968.c
fm801.c
intel8x0.c
intel8x0m.c
maestro3.c
rme32.c
rme96.c
sis7019.c
sis7019.h
sonicvibes.c
via82xx.c
via82xx_modem.c