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 11:25:32 +0000 (13:25 +0200)
commit962f22e7f7698f7718d95bd9b63e41fb8cca01a9
tree8872a282bf16a8e9132ac0504f2f602d2a0a621f
parent70f0a0a27d79f689defc5f5f0bd47d07813e6dea
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