Skip to content
Unverified Commit e45ac783 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Mark Brown
Browse files

ASoC: mediatek: mt8192-mt6359: Fix error handling in mt8192_mt6359_dev_probe



The device_node pointer is returned by of_parse_phandle()  with refcount
incremented. We should use of_node_put() on it when done.

This function only calls of_node_put() in the regular path.
And it will cause refcount leak in error paths.
Fix this by calling of_node_put() in error handling too.

Fixes: 4e28491a ("ASoC: mediatek: mt8192-mt6359: fix device_node leak")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220308015224.23585-1-linmq006@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5575f7f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment