From: Dan Carpenter Date: Tue, 8 Jan 2019 07:43:30 +0000 (+0300) Subject: ALSA: cs46xx: Potential NULL dereference in probe X-Git-Tag: MMI-QSB30.62-17~983^2~44^2~28 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=89c7ba90185dc9af684a17027300899e189039cd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ALSA: cs46xx: Potential NULL dereference in probe commit 1524f4e47f90b27a3ac84efbdd94c63172246a6f upstream. The "chip->dsp_spos_instance" can be NULL on some of the ealier error paths in snd_cs46xx_create(). Reported-by: "Yavuz, Tuba" Signed-off-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index aa61615288ff..f03bbd0eb027 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c @@ -900,6 +900,9 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip) struct dsp_spos_instance * ins = chip->dsp_spos_instance; int i; + if (!ins) + return 0; + snd_info_free_entry(ins->proc_sym_info_entry); ins->proc_sym_info_entry = NULL;