Commit 081dc8ab authored by Guneshwor Singh's avatar Guneshwor Singh Committed by Mark Brown

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: default avatarGuneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9ed4aefe
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment