From: Jeeja KP Date: Thu, 22 Oct 2015 17:52:40 +0000 (+0530) Subject: ASoC: Intel: Skylake: Fix to check return value of dsp init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ac454ffe6c2cb923711edc8027bbc0e782be457;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- 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);