diff options
author | Jeeja KP <jeeja.kp@intel.com> | 2015-10-22 23:22:40 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-24 01:31:34 +0900 |
commit | 2ac454ffe6c2cb923711edc8027bbc0e782be457 (patch) | |
tree | 99f378ff9d0c7269876d78ceb5f599eaa69ef03e /sound/soc | |
parent | 4e10996ba810031a493d903539f595e053826103 (diff) |
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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/intel/skylake/skl-messages.c | 3 |
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 ca7bbeea2cd9..a1001a686aa9 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); |