Skip to content

Commit 6538258

Browse files
Yuuoniyandersson
authored andcommitted
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: 53e2822 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Miaoqian Lin <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 101042f commit 6538258

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/rpmsg/qcom_smd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,7 @@ static int qcom_smd_parse_edge(struct device *dev,
13831383
}
13841384

13851385
edge->ipc_regmap = syscon_node_to_regmap(syscon_np);
1386+
of_node_put(syscon_np);
13861387
if (IS_ERR(edge->ipc_regmap)) {
13871388
ret = PTR_ERR(edge->ipc_regmap);
13881389
goto put_node;

0 commit comments

Comments
 (0)