]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 10 Dec 2019 00:34:48 +0000 (09:34 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 10 Dec 2019 13:18:42 +0000 (13:18 +0000)
commit4702f99148dae94b00bcb7bbba6cd9ca01651e69
tree79d50bc143f99f59dd12988cf281b46cdc9e25c9
parenteaffeefbd042a44ca31f60f299a27d899aa4ec26
ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition

Current soc_set_name_prefix() for loop is checking both codec_conf
pointer and its number

for (...; i < card->num_configs && card->codec_conf; ...)

But, if card->num_configs exists but card->codec_conf was NULL,
it is just bug.
This patch cleanups for loop condition.

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