Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: audio-graph-card2: call of_node_get() before of_get_next_child()
commit c6f597b ("ASoC: audio-graph-card2: remove unneeded of_node_get()") removed of_node_get(), but it need to keep original reference, so of_node_get() itself is needed. Because of_get_next_child() will call of_node_put() inside, if the reference count dropped to zero, then of_node_get() after that will be use afer free. Need to call of_node_get() *before* that. Fixes: c6f597b ("ASoC: audio-graph-card2: remove unneeded of_node_get()") Link: https://lore.kernel.org/r/[email protected] Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
- Loading branch information