diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-05-11 15:07:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-21 16:16:08 +0300 |
commit | 9715809b9eeb85b3f9b083857a2f29a9e2351125 (patch) | |
tree | 95ea86ddf53bb3f0dc0302e02fd903e660536841 /drivers | |
parent | 0ce20194b4a68fda406011c3e6c674d076b46a5e (diff) | |
download | linux-9715809b9eeb85b3f9b083857a2f29a9e2351125.tar.xz |
rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge
[ Upstream commit 65382585f067d4256ba087934f30f85c9b6984de ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-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 a4db9f6100d2..0b1e853d8c91 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1364,6 +1364,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; |