diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-05-11 16:07:37 +0400 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-07-16 22:15:40 -0500 |
commit | 65382585f067d4256ba087934f30f85c9b6984de (patch) | |
tree | 3cf4b922a02c636712ab8724d71353ae43a5c15f /drivers/rpmsg | |
parent | 101042f4c0eb2daa331b4f7ce32c6d547114830a (diff) |
rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220511120737.57374-1-linmq006@gmail.com
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/qcom_smd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index c87413a5bf6c..1044cf03c542 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1383,6 +1383,7 @@ static int qcom_smd_parse_edge(struct device *dev, } edge->ipc_regmap = syscon_node_to_regmap(syscon_np); + of_node_put(syscon_np); if (IS_ERR(edge->ipc_regmap)) { ret = PTR_ERR(edge->ipc_regmap); goto put_node; |