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 ALSA: au88x0: use explicitly signed char 2022-11-03 23:50:52 +09:00
aw2
ca0106 ALSA: ca0106: fix error code handling 2020-09-09 19:03:11 +02:00
cs46xx ALSA: pci: delete repeated words in comments 2020-09-03 11:22:24 +02:00
cs5535audio
ctxfi ALSA: ctxfi: Fix out-of-range access 2021-12-08 08:46:47 +01:00
echoaudio ALSA: echoaudio: Fix potential Oops in snd_echo_resume() 2020-08-21 09:48:23 +02:00
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 ALSA: pci: lx6464es: fix a debug loop 2023-02-22 12:46:04 +01:00
mixart ALSA: mixart: Fix mutex deadlock 2020-11-24 13:05:52 +01:00
nm256
oxygen ALSA: pci: delete repeated words in comments 2020-09-03 11:22:24 +02:00
pcxhr
riptide
rme9652 ALSA: rme9652: don't disable if not enabled 2021-05-22 10:57:36 +02:00
trident
vx222
ymfpci
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: Restore aux vol on suspend/resume 2022-03-28 08:22:27 +02:00
cs4281.c
cs5530.c
ens1370.c
ens1371.c
es1938.c
es1968.c
fm801.c
intel8x0.c
intel8x0m.c ALSA: intel8x0m: Register irq handler after register initializations 2019-11-20 17:59:58 +01:00
Kconfig
maestro3.c
Makefile
rme32.c
rme96.c
sis7019.c
sis7019.h
sonicvibes.c
via82xx.c
via82xx_modem.c