Commit 06f2ce05 authored by Dan Carpenter's avatar Dan Carpenter Committed by Juerg Haefliger

ALSA: cs46xx: Potential NULL dereference in probe

BugLink: https://bugs.launchpad.net/bugs/1811647

commit 1524f4e4 upstream.

The "chip->dsp_spos_instance" can be NULL on some of the ealier error
paths in snd_cs46xx_create().
Reported-by: default avatar"Yavuz, Tuba" <tuba@ece.ufl.edu>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 44679e78
...@@ -899,6 +899,9 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip) ...@@ -899,6 +899,9 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
struct dsp_spos_instance * ins = chip->dsp_spos_instance; struct dsp_spos_instance * ins = chip->dsp_spos_instance;
int i; int i;
if (!ins)
return 0;
snd_info_free_entry(ins->proc_sym_info_entry); snd_info_free_entry(ins->proc_sym_info_entry);
ins->proc_sym_info_entry = NULL; ins->proc_sym_info_entry = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment