platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()
authorLiang He <windhl@126.com>
Wed, 22 Mar 2023 04:16:57 +0000 (12:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:16 +0000 (23:03 +0900)
commit830d79af9eee9ad0b18074110c547eaa748a3ec1
treec6bcd552acde99fbd5a5dae5e3feda6170be373a
parentaefea3016a150ec3c10cc3b77b8a00631cc2b40b
platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

[ Upstream commit dc70234c408c644505a24362b0f095f713e4697e ]

In cros_typec_register_switches(), we should add fwnode_handle_put()
when break out of the iteration device_for_each_child_node()
as it will automatically increase and decrease the refcounter.

Fixes: affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20230322041657.1857001-1-windhl@126.com
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_typec_switch.c