ASoC: soc-core: remove unneeded list_empty() check for snd_soc_try_rebind_card()

list_for_each_entry_safe() will do nothing if it was empty list.
This patch removes unneeded list_empty() check for
list_for_each_entry_safe().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878ss5aho6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2019-08-07 10:31:19 +09:00 committed by Mark Brown
parent d8ca7a0a85
commit b245d273cb
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -2808,12 +2808,9 @@ static void snd_soc_try_rebind_card(void)
{
struct snd_soc_card *card, *c;
if (!list_empty(&unbind_card_list)) {
list_for_each_entry_safe(card, c, &unbind_card_list, list) {
if (!snd_soc_bind_card(card))
list_del(&card->list);
}
}
list_for_each_entry_safe(card, c, &unbind_card_list, list)
if (!snd_soc_bind_card(card))
list_del(&card->list);
}
int snd_soc_add_component(struct device *dev,