Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / sound / soc / intel / skylake / skl-topology.c
index 108ebb9ab3291ca5cf939dc7db9142cba344be5d..2d475b7209634a28b57d50a0e46f9c9b35599898 100644 (file)
@@ -523,6 +523,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
 static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
         struct skl_pipe *pipe)
 {
+       int ret;
        struct skl_pipe_module *w_module = NULL;
        struct skl_module_cfg *mconfig = NULL;
 
@@ -530,9 +531,12 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
                mconfig  = w_module->w->priv;
 
                if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod &&
-                       mconfig->m_state > SKL_MODULE_UNINIT)
-                       return ctx->dsp->fw_ops.unload_mod(ctx->dsp,
+                       mconfig->m_state > SKL_MODULE_UNINIT) {
+                       ret = ctx->dsp->fw_ops.unload_mod(ctx->dsp,
                                                mconfig->id.module_id);
+                       if (ret < 0)
+                               return -EIO;
+               }
        }
 
        /* no modules to unload in this path, so return */
@@ -2401,6 +2405,10 @@ static int skl_manifest_load(struct snd_soc_component *cmpnt,
        struct skl *skl = ebus_to_skl(ebus);
        int ret = 0;
 
+       /* proceed only if we have private data defined */
+       if (manifest->priv.size == 0)
+               return 0;
+
        minfo = &skl->skl_sst->manifest;
 
        skl_tplg_get_manifest_data(manifest, bus->dev, minfo);
This page took 0.0246 seconds and 5 git commands to generate.