projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8ca7a0
)
ASoC: soc-core: remove unneeded list_empty() check for snd_soc_try_rebind_card()
author
Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com>
Wed, 7 Aug 2019 01:31:19 +0000
(10:31 +0900)
committer
Mark Brown
<broonie@kernel.org>
Thu, 8 Aug 2019 19:56:56 +0000
(20:56 +0100)
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>
sound/soc/soc-core.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index cf3d967d731e63b602c3cff4260a0cb7c96920c2..6b0042835233e5dec7c28b5c3e7d952c43fafb27 100644
(file)
--- 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,