From: Srinivas Kandagatla Date: Thu, 31 Mar 2016 18:23:14 +0000 (+0100) Subject: ASoC: qcom: Fix uninitialized symbol warning. X-Git-Tag: v4.7-rc1~11^2^2~3^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ea4d25d5a3709cba0d3df2195edffc400170394f;p=karo-tx-linux.git 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 Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown --- 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;