]> git.baikalelectronics.ru Git - kernel.git/commit
ASoc: audio-graph-card2: Fix refcount leak bug in __graph_get_type()
authorLiang He <windhl@126.com>
Wed, 13 Jul 2022 07:12:00 +0000 (15:12 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 13 Jul 2022 12:48:54 +0000 (13:48 +0100)
commit764547005363d45cebd2c93325b98bfffb24505a
treec31a51ac120ebcfa6d3363016d97d6859e84bfc5
parentd499f2af3c6e06e0c6f596e57f3cbad0f25b82b8
ASoc: audio-graph-card2: Fix refcount leak bug in __graph_get_type()

We should call of_node_put() for the reference before its replacement
as it returned by of_get_parent() which has increased the refcount.
Besides, we should also call of_node_put() before return.

Fixes: 52300a77984b ("ASoC: audio-graph-card2: add Multi CPU/Codec support")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220713071200.366729-1-windhl@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card2.c