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:17:03 +0000 (13:17 +0200)
commit18e199a5541aad6dc5cf51bc3f712247b2d17894
tree4da68d8547abf2cd8830c1dd25ecb9d5e4f8789b
parent6f76ef65899fcd93ca747ef38d7a41931e61e4fa
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