summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2016-03-31 20:23:14 +0200
committerMark Brown <broonie@kernel.org>2016-03-31 20:42:48 +0200
commitea4d25d5a3709cba0d3df2195edffc400170394f (patch)
treeb5c3901fb7494fadafa62bdabedcd063d7bef825 /sound/soc
parentLinux 4.6-rc1 (diff)
downloadlinux-ea4d25d5a3709cba0d3df2195edffc400170394f.tar.xz
linux-ea4d25d5a3709cba0d3df2195edffc400170394f.zip
ASoC: qcom: Fix uninitialized symbol warning.
This patch fixes following static checker warning, by initializing the ret to -EINVAL, as one of the code path in lpass_platform_pcm_new() uses this variable uninitialized. sound/soc/qcom/lpass-platform.c:555 lpass_platform_pcm_new() error: uninitialized symbol 'ret'. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/qcom/lpass-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index 6e8665430bd5..f5cae01d18bd 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -474,7 +474,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
struct lpass_data *drvdata =
snd_soc_platform_get_drvdata(soc_runtime->platform);
struct lpass_variant *v = drvdata->variant;
- int ret;
+ int ret = -EINVAL;
struct lpass_pcm_data *data;
size_t size = lpass_platform_pcm_hardware.buffer_bytes_max;