summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-sst.c
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2015-10-30 20:34:19 +0530
committerMark Brown <broonie@kernel.org>2015-11-16 10:08:09 +0000
commitb4fe965f4e949d0d965561801de89e90b673b65a (patch)
tree623e99c83eed66565816f7169dce231595f50dc6 /sound/soc/intel/skylake/skl-sst.c
parentaaec7e9f789eff57f620f38a96d0118b2a7d71c3 (diff)
downloadlinux-b4fe965f4e949d0d965561801de89e90b673b65a.tar.bz2
ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails
This patch fixes the below warning reported by Dan by invoking skl_sst_dsp_cleanup() in cleanup path on error and not bailing out sound/soc/intel/skylake/skl-sst.c:270 skl_sst_dsp_init() info: ignoring unreachable code. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst.c')
-rw-r--r--sound/soc/intel/skylake/skl-sst.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index 3b83dc99f1d4..5c5a244942ef 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -259,15 +259,16 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
ret = sst->fw_ops.load_fw(sst);
if (ret < 0) {
dev_err(dev, "Load base fw failed : %d", ret);
- return ret;
+ goto cleanup;
}
if (dsp)
*dsp = skl;
- return 0;
+ return ret;
- skl_ipc_free(&skl->ipc);
+cleanup:
+ skl_sst_dsp_cleanup(dev, skl);
return ret;
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_init);