]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: tidyup for snd_soc_dapm_new_controls()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 7 Aug 2019 01:30:53 +0000 (10:30 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 7 Aug 2019 13:25:58 +0000 (14:25 +0100)
commite7a505cc63efc365a96bc1fedc5ac67411bf0e9c
treefed437df9f7f45d845e0fd6fbc93c9a0a5f1e180
parent4c650fcf5da624e439456e49dee848f30cb17931
ASoC: soc-core: tidyup for snd_soc_dapm_new_controls()

snd_soc_dapm_new_controls() registers controls by using
for(... i < num; ...). It means if widget was NULL, num should be zero.
Thus, we don't need to check about widget pointer.
This patch also cares missing return value.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ftmdahow.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c