未验证 提交 a6e849d0 编写于 作者: S Simon Trimmer 提交者: Mark Brown

ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'

This patch fixes the static analysis warning as it is correctly
indicating a possible code path, it cannot know that for the affected
firmware versions subname would always be NULL.
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSimon Trimmer <simont@opensource.cirrus.com>
Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211115120154.56782-1-simont@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 7e5dfedb
...@@ -617,8 +617,9 @@ static int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl) ...@@ -617,8 +617,9 @@ static int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl)
switch (cs_dsp->fw_ver) { switch (cs_dsp->fw_ver) {
case 0: case 0:
case 1: case 1:
snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, "%s %s %x", ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
cs_dsp->name, region_name, cs_ctl->alg_region.alg); "%s %s %x", cs_dsp->name, region_name,
cs_ctl->alg_region.alg);
break; break;
case 2: case 2:
ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册