未验证 提交 c8415833 编写于 作者: C Colin Ian King 提交者: Mark Brown

ASoC: codec2codec: fix missing return of error return code

Currently in function snd_soc_dai_link_event_pre_pmu the error return
code in variable err is being set but this is not actually being returned,
the function just returns zero even when there are failures. Fix this by
returning the error return code.

Addresses-Coverity: ("Unused value")
Fixes: 3dcfb397 ("ASoC: codec2codec: deal with params when necessary")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190726123327.10467-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 d8481155
......@@ -3776,7 +3776,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
struct snd_pcm_hw_params *params = NULL;
const struct snd_soc_pcm_stream *config = NULL;
unsigned int fmt;
int ret;
int ret = 0;
params = kzalloc(sizeof(*params), GFP_KERNEL);
if (!params)
......@@ -3865,7 +3865,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
out:
kfree(params);
return 0;
return ret;
}
static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册