Skip to content

Commit dc70234

Browse files
windhlTzung-Bi Shih
authored andcommitted
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: affc804 ("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>
1 parent 554ec02 commit dc70234

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/platform/chrome/cros_typec_switch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ static int cros_typec_register_switches(struct cros_typec_switch_data *sdata)
270270

271271
return 0;
272272
err_switch:
273+
fwnode_handle_put(fwnode);
273274
cros_typec_unregister_switches(sdata);
274275
return ret;
275276
}

0 commit comments

Comments
 (0)