diff options
author | Guneshwor Singh <guneshwor.o.singh@intel.com> | 2017-04-27 12:21:22 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-04-30 21:50:28 +0900 |
commit | 081dc8ab46df85382658822e951ea79be87382b0 (patch) | |
tree | de4eb6717f7301fcd9a296358450dbe7f1ea3571 /sound/soc/intel/skylake/skl-topology.c | |
parent | 9ed4aefe6f5f7e1dfe6abe8b15cfc8c48963b6c0 (diff) | |
download | linux-081dc8ab46df85382658822e951ea79be87382b0.tar.bz2 |
ASoC: Intel: Skylake: Return negative error code
skl_tplg_add_pipe() returned EEXIST instead of negative EEXIST, so fix that
and handle the return value as well.
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-topology.c')
-rw-r--r-- | sound/soc/intel/skylake/skl-topology.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 0e459d3eb17a..29f68713a231 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -1711,7 +1711,7 @@ static int skl_tplg_add_pipe(struct device *dev, list_for_each_entry(ppl, &skl->ppl_list, node) { if (ppl->pipe->ppl_id == tkn_elem->value) { mconfig->pipe = ppl->pipe; - return EEXIST; + return -EEXIST; } } @@ -2003,11 +2003,13 @@ static int skl_tplg_get_token(struct device *dev, ret = skl_tplg_add_pipe(dev, mconfig, skl, tkn_elem); - if (ret < 0) + if (ret < 0) { + if (ret == -EEXIST) { + is_pipe_exists = 1; + break; + } return is_pipe_exists; - - if (ret == EEXIST) - is_pipe_exists = 1; + } break; |