Unverified Commit b245d273 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878ss5aho6.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d8ca7a0a
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -2808,13 +2808,10 @@ 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) {
	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,
			struct snd_soc_component *component,