From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
snd_soc_add_card_controls() registers controls by using for(... i < num; ...). If controls was NULL, num should be zero. Thus, we don't need to check about controls pointer.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/soc-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 5b26a59..f138c83 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2048,9 +2048,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) snd_soc_dapm_link_dai_widgets(card); snd_soc_dapm_connect_dai_link_widgets(card);
- if (card->controls) - snd_soc_add_card_controls(card, card->controls, - card->num_controls); + snd_soc_add_card_controls(card, card->controls, + card->num_controls);
snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes, card->num_dapm_routes);