summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-08-07 10:31:19 +0900
committerMark Brown <broonie@kernel.org>2019-08-08 20:56:56 +0100
commitb245d273cbcd64eeaa93305f99c4ea8a6baf9c89 (patch)
tree04401ec16ffa906d89823f2fb3edf0f2374d7c4b /sound/soc/soc-core.c
parentd8ca7a0a8583fc491b625450580c4092879af3dd (diff)
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>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cf3d967d731e..6b0042835233 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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,