summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter2019-01-08 08:43:30 +0100
committerGreg Kroah-Hartman2019-01-13 09:51:06 +0100
commit281a9e46a94c18d3c4377aee3221b89aa65d2e00 (patch)
tree93bc588f16d4576c21a66fbad5a1ad260682b8b6 /sound
parentmedia: cx23885: only reset DMA on problematic CPUs (diff)
downloadkernel-qcow2-linux-281a9e46a94c18d3c4377aee3221b89aa65d2e00.tar.gz
kernel-qcow2-linux-281a9e46a94c18d3c4377aee3221b89aa65d2e00.tar.xz
kernel-qcow2-linux-281a9e46a94c18d3c4377aee3221b89aa65d2e00.zip
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" <tuba@ece.ufl.edu> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/cs46xx/dsp_spos.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
index 598d140bb7cb..5fc497c6d738 100644
--- a/sound/pci/cs46xx/dsp_spos.c
+++ b/sound/pci/cs46xx/dsp_spos.c
@@ -903,6 +903,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;