Skip to content

Commit b9eff97

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-core: call missing INIT_LIST_HEAD() for card_aux_list
Component has "card_aux_list" which is added/deled in bind/unbind aux dev function (A), and used in for_each_card_auxs() loop (B). static void soc_unbind_aux_dev(...) { ... for_each_card_auxs_safe(...) { ... (A) list_del(&component->card_aux_list); } ^^^^^^^^^^^^^ } static int soc_bind_aux_dev(...) { ... for_each_card_pre_auxs(...) { ... (A) list_add(&component->card_aux_list, ...); } ^^^^^^^^^^^^^ ... } #define for_each_card_auxs(card, component) \ (B) list_for_each_entry(component, ..., card_aux_list) ^^^^^^^^^^^^^ But it has been used without calling INIT_LIST_HEAD(). > git grep card_aux_list sound/soc sound/soc/soc-core.c: list_del(&component->card_aux_list); sound/soc/soc-core.c: list_add(&component->card_aux_list, ...); call missing INIT_LIST_HEAD() for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87341mxa8l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 8ec017c commit b9eff97

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/soc/soc-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,7 @@ int snd_soc_component_initialize(struct snd_soc_component *component,
28592859
INIT_LIST_HEAD(&component->dobj_list);
28602860
INIT_LIST_HEAD(&component->card_list);
28612861
INIT_LIST_HEAD(&component->list);
2862+
INIT_LIST_HEAD(&component->card_aux_list);
28622863
mutex_init(&component->io_mutex);
28632864

28642865
if (!component->name) {

0 commit comments

Comments
 (0)