Skip to content

Commit

Permalink
remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_me…
Browse files Browse the repository at this point in the history
…mory_region()

The pointer node is returned by of_parse_phandle() with refcount
incremented. We should use of_node_put() on it when done.

Fixes: b9e718e ("remoteproc: Introduce Qualcomm ADSP PIL")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221203070639.15128-1-yuancan@huawei.com
  • Loading branch information
Yuan Can authored and Bjorn Andersson committed Dec 7, 2022
1 parent 34d01df commit 38e7d9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/remoteproc/qcom_q6v5_pas.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp)
}

ret = of_address_to_resource(node, 0, &r);
of_node_put(node);
if (ret)
return ret;

Expand Down

0 comments on commit 38e7d9c

Please sign in to comment.