]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 06:45:21 +0000 (06:45 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 11 Mar 2022 20:03:41 +0000 (14:03 -0600)
commit26dd9b29a9ecbec4dce080f7a4fb83bd697de756
tree0a484f54988cdb404416b6049fb38d0c37060b90
parentf3a199267f1487d56d6df843dc400e13f14e1259
remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region

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

This function only call of_node_put(node) when of_address_to_resource
succeeds, missing error cases.

Fixes: f4f49a1aaf70 ("remoteproc: qcom: Fix potential device node leaks")
Fixes: ed73639ccaeb ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220308064522.13804-1-linmq006@gmail.com
drivers/remoteproc/qcom_q6v5_mss.c