summaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorSu Hui <suhui@nfschina.com>2023-08-23 10:52:13 +0800
committerTakashi Iwai <tiwai@suse.de>2023-08-24 10:02:01 +0200
commit67de40c9df94037769967ba28c7d951afb45b7fb (patch)
tree83485551819cc0b3e97c2b6fd19ede8b63838895 /fs/file.c
parent22459ef3a9dea5249c250b30046c3b31cc684da9 (diff)
ALSA: ac97: Fix possible error value of *rac97
Before committing 79597c8bf64c, *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: 79597c8bf64c ("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>
Diffstat (limited to 'fs/file.c')
0 files changed, 0 insertions, 0 deletions