HSI: omap_ssi: Fix refcount leak in ssi_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 4 Apr 2022 08:52:32 +0000 (08:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:05 +0000 (12:35 +0200)
commit691f23a8475f04c988f7e98066b084e996b40fa0
tree7258738e454e5f79c85ed88f2fca8ef313fbd041
parentd6e750535b46e12cdde185b416c415e49e4e6e22
HSI: omap_ssi: Fix refcount leak in ssi_probe

[ Upstream commit 9a2ea132df860177b33c9fd421b26c4e9a0a9396 ]

When returning or breaking early from a
for_each_available_child_of_node() loop, we need to explicitly call
of_node_put() on the child node to possibly release the node.

Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hsi/controllers/omap_ssi_core.c