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)
commit0dc1663e3fc22c72e1ab33be7701a0d51cca84ef
tree89602f0b7dfaed640d3c5ea0be7c9cb0fe2e0fb2
parentf0c151602f9b2d6a943ff11b311ecbac8146f6b8
remoteproc: imx_rproc: Fix refcount leak in imx_rproc_addr_init

[ Upstream commit 61afafe8b938bc74841cf4b1a73dd08b9d287c5a ]

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: 6e962bfe56b9 ("remoteproc: imx_rproc: add missing of_node_put")
Fixes: a0ff4aa6f010 ("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