mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()
[ Upstream commitdc70234c40
] 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:affc804c44
("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>
This commit is contained in:
parent
984f880040
commit
a218b5ffaa
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue