summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2015-10-22 17:52:40 (GMT)
committerMark Brown <broonie@kernel.org>2015-10-23 16:31:34 (GMT)
commit2ac454ffe6c2cb923711edc8027bbc0e782be457 (patch)
tree99f378ff9d0c7269876d78ceb5f599eaa69ef03e
parent4e10996ba810031a493d903539f595e053826103 (diff)
downloadlinux-2ac454ffe6c2cb923711edc8027bbc0e782be457.tar.xz
ASoC: Intel: Skylake: Fix to check return value of dsp init
If DSP initialization fails, ipc to disable notification will cause NULL ptr exception as ipc is not initialized. This patch returns error if dsp init fails before sending disable notification ipc. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/skylake/skl-messages.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index ca7bbee..a1001a6 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -97,6 +97,9 @@ int skl_init_dsp(struct skl *skl)
ret = skl_sst_dsp_init(bus->dev, mmio_base, irq,
loader_ops, &skl->skl_sst);
+ if (ret < 0)
+ return ret;
+
skl_dsp_enable_notification(skl->skl_sst, false);
dev_dbg(bus->dev, "dsp registration status=%d\n", ret);