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

ASoC: atmel: Fix error handling in snd_proto_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: a45f8853 ("ASoC: Add driver for PROTO Audio CODEC (with a WM8731)")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: default avatarCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20220308013949.20323-1-linmq006@gmail.com


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