]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc: imx_rproc: Fix refcount leak in imx_rproc_addr_init
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 04:55:58 +0000 (08:55 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:04 +0000 (14:24 +0200)
commit30bd330c0481a29f012b1a870e79b65ec7a80248
tree89602f0b7dfaed640d3c5ea0be7c9cb0fe2e0fb2
parent5a85a186049cef9ffb25b59edab75fdceba85b94
remoteproc: imx_rproc: Fix refcount leak in imx_rproc_addr_init

[ Upstream commit beb1cd12c9358bbd3381ebfc7516b8f8eedb674c ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not needed anymore.
This function has two paths missing of_node_put().

Fixes: 73cbacc30eca ("remoteproc: imx_rproc: add missing of_node_put")
Fixes: d6977ef3a210 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220512045558.7142-1-linmq006@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/imx_rproc.c