]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
authorMiaoqian Lin <linmq006@gmail.com>
Fri, 3 Jun 2022 13:10:43 +0000 (17:10 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:01 +0000 (14:24 +0200)
commitedbcc4657d0b45ea29d363427372cf2a53c83240
tree84ff5d6780395a5d99b286d7b9a3fd913d626028
parentebeb95ae85020360990a26f11c94e0dfe808a480
ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe

[ Upstream commit c8d08d0c7af916c1f1039c0e710833f4debfd06c ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: f9484618e3f1 ("ASoC: cros_ec_codec: support WoV")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220603131043.38907-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cros_ec_codec.c