]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: cs46xx: Potential NULL dereference in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Jan 2019 07:43:30 +0000 (10:43 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2019 08:02:54 +0000 (09:02 +0100)
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>
sound/pci/cs46xx/dsp_spos.c

index 598d140bb7cb719c799f07e381361ebd133f19a6..5fc497c6d7384ec4886e56446439f1efab16aff7 100644 (file)
@@ -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;