summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2020-06-22 17:03:31 +0800
committerMark Brown <broonie@kernel.org>2020-06-23 12:54:09 +0100
commit5748f4eb01a4df7a42024fe8bc7855f05febb7c5 (patch)
tree4b6c2bfa066c1184a4b3a112218025fe2619f64e
parent39853b1438bf9b07349c8c44b48f6c2eda6f8840 (diff)
downloadlinux-5748f4eb01a4df7a42024fe8bc7855f05febb7c5.tar.bz2
ASoC: fsl_easrc: Fix uninitialized scalar variable in fsl_easrc_set_ctx_format
The "ret" in fsl_easrc_set_ctx_format is not initialized, then the unknown value maybe returned by this function. Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/1592816611-16297-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/fsl/fsl_easrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index 58cc093ad741..60951a8aabd3 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -1129,7 +1129,7 @@ static int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx,
struct fsl_easrc_ctx_priv *ctx_priv = ctx->private;
struct fsl_easrc_data_fmt *in_fmt = &ctx_priv->in_params.fmt;
struct fsl_easrc_data_fmt *out_fmt = &ctx_priv->out_params.fmt;
- int ret;
+ int ret = 0;
/* Get the bitfield values for input data format */
if (in_raw_format && out_raw_format) {