]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: SOF: topology: check errors when parsing LED tokens
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 11 Oct 2019 16:43:12 +0000 (11:43 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 14 Oct 2019 11:58:55 +0000 (12:58 +0100)
commit8a3ab38c36926ddbda3d2a3086c0a741fa175cff
treef702daa486d1e85a851accc0193b29e77fe5a0b5
parent494e8f65da24d550a5e7c6a85b9433ffb181705c
ASoC: SOF: topology: check errors when parsing LED tokens

sof_parse_tokens() returns a value that is checked on every call
except for LED tokens, fix with explicit test.

Detected with cppcheck warning:

sound/soc/sof/topology.c:973:6: style: Variable 'ret' is assigned a
value that is never used. [unreadVariable]
 ret = sof_parse_tokens(scomp, &scontrol->led_ctl, led_tokens,
     ^

Fixes: 5d43001ae4360 ("ASoC: SOF: acpi led support for switch controls")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191011164312.7988-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c