10 May
2024
10 May
'24
10:50 a.m.
On Fri, May 10, 2024 at 12:24:55AM +0000, Kuninori Morimoto wrote:
commit c6f597bc598a8 ("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: c6f597bc598a ("ASoC: audio-graph-card2: remove unneeded of_node_get()") Link: https://lore.kernel.org/r/f930862e-9d30-4ea3-b3e7-b4b4f411f6d1@moroto.mounta... Reported-by: Dan Carpenter dan.carpenter@linaro.org Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Thanks!
regards, dan carpenter