Skip to content
Commit af8f6f39 authored by Liang He's avatar Liang He Committed by Bjorn Andersson
Browse files

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



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
parent 14af4ce0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment