diff options
author | Subhransu S. Prusty <subhransu.s.prusty@intel.com> | 2017-08-22 14:15:50 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-23 13:55:07 +0300 |
commit | 3b3011adada3bba47c56c205634e1b32512e0c7c (patch) | |
tree | 55a9ddb581c0e82c6dd7566a54ed0f8ba08e694f /sound/soc/intel/skylake/skl-sst.c | |
parent | 80b649039240ec41a6ab0a5e347853bc78abfd2d (diff) | |
download | linux-3b3011adada3bba47c56c205634e1b32512e0c7c.tar.xz |
ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failure
For some dsp init error path, irq and few more resources are not freed.
This results in oops. So, fix it by freeing up the resources on ipc_init
failure.
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c index a7ad734f591d..a436abf2fe3f 100644 --- a/sound/soc/intel/skylake/skl-sst.c +++ b/sound/soc/intel/skylake/skl-sst.c @@ -562,8 +562,10 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, SKL_ADSP_W0_UP_SZ, SKL_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); ret = skl_ipc_init(dev, skl); - if (ret) + if (ret) { + skl_dsp_free(sst); return ret; + } sst->fw_ops = skl_fw_ops; |