summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2016-02-03 13:29:48 +0100
committerMark Brown <broonie@kernel.org>2016-02-04 12:36:14 +0100
commit9cf3049e21e4e6873aae45df19c11f7243e2f03f (patch)
tree226c25d1d57612706bc88e7aab36f9704e245c56 /sound
parentASoC: Intel: Skylake: Fix pipe memory allocation leak (diff)
downloadlinux-9cf3049e21e4e6873aae45df19c11f7243e2f03f.tar.xz
linux-9cf3049e21e4e6873aae45df19c11f7243e2f03f.zip
ASoC: Intel: Skylake: Fix return of skl_get_queue_index
In unbind modules, the skl_get_queue_index() can return error if the pin is dynamic and module is not bound yet. So instead of returning error this check should return success as modules is not yet bound. This will let the module be bound when connected pipes are enabled and will bind this as well. So change the return value to 0 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')
-rw-r--r--sound/soc/intel/skylake/skl-messages.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index de6dac496a0d..bb5f1d7d0cad 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -688,14 +688,14 @@ int skl_unbind_modules(struct skl_sst *ctx,
/* get src queue index */
src_index = skl_get_queue_index(src_mcfg->m_out_pin, dst_id, out_max);
if (src_index < 0)
- return -EINVAL;
+ return 0;
msg.src_queue = src_index;
/* get dst queue index */
dst_index = skl_get_queue_index(dst_mcfg->m_in_pin, src_id, in_max);
if (dst_index < 0)
- return -EINVAL;
+ return 0;
msg.dst_queue = dst_index;