Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 42df2899 authored by Liang He's avatar Liang He Committed by Greg Kroah-Hartman
Browse files

soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()



[ Upstream commit af8f6f39b8afd772fda4f8e61823ef8c021bf382 ]

There are two refcount leak bugs in qcom_smsm_probe():

(1) The 'local_node' is escaped out from for_each_child_of_node() as
the break of iteration, we should call of_node_put() for it in error
path or when it is not used anymore.
(2) The 'node' is escaped out from for_each_available_child_of_node()
as the 'goto', we should call of_node_put() for it in goto target.

Fixes: c97c4090 ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220721135217.1301039-1-windhl@126.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 68c9c4e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment