From: Liang He Date: Wed, 22 Mar 2023 04:16:57 +0000 (+0800) Subject: platform/chrome: cros_typec_switch: Add missing fwnode_handle_put() X-Git-Tag: v6.6.7~3027^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc70234c408c644505a24362b0f095f713e4697e;p=platform%2Fkernel%2Flinux-starfive.git platform/chrome: cros_typec_switch: Add missing fwnode_handle_put() 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 Link: https://lore.kernel.org/r/20230322041657.1857001-1-windhl@126.com Signed-off-by: Prashant Malani --- diff --git a/drivers/platform/chrome/cros_typec_switch.c b/drivers/platform/chrome/cros_typec_switch.c index 9ed1605f..7527204 100644 --- a/drivers/platform/chrome/cros_typec_switch.c +++ b/drivers/platform/chrome/cros_typec_switch.c @@ -270,6 +270,7 @@ static int cros_typec_register_switches(struct cros_typec_switch_data *sdata) return 0; err_switch: + fwnode_handle_put(fwnode); cros_typec_unregister_switches(sdata); return ret; }