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)
commitb8ba3b572c70c8559ef76c1e0ca02e7b05126e8c
treefed437df9f7f45d845e0fd6fbc93c9a0a5f1e180
parent32d2c172fe88705058310635a732259c0a98e89b
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