]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 22 May 2022 05:58:31 +0000 (15:58 +1000)
commit28de78d62f39da454fc66183cd5d3f6aa04e1841
tree923f087e9dbddba27329697a22766a40ffd4c032
parent18a3aadd2ae753eda2c74c0368dec78f370648a6
powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup

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: 8b5fea4cf4a4 ("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
arch/powerpc/sysdev/fsl_rio.c