powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 12:37:18 +0000 (16:37 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:10 +0000 (10:26 +0200)
commitc70dd353d37158e06bf8d450d4b31a7091609924
treecbee0de8894355034126921925dadabb9edb4a8d
parent6e806485d851986a2445267608f27cb4ba2ed774
powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup

[ Upstream commit fcee96924ba1596ca80a6770b2567ca546f9a482 ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: abc3aeae3aaa ("fsl-rio: Add two ports and rapidio message units support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220512123724.62931-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/fsl_rio.c