Skip to content

Commit acd0acb

Browse files
windhljwrdegoede
authored andcommitted
platform/surface: aggregator: Add missing fwnode_handle_put()
In fwnode_for_each_child_node(), we should add fwnode_handle_put() when break out of the iteration fwnode_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes: fc622b3 ("platform/surface: Set up Surface Aggregator device registry") Signed-off-by: Liang He <windhl@126.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20230322033057.1855741-1-windhl@126.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 8a02d70 commit acd0acb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/platform/surface/aggregator

drivers/platform/surface/aggregator/bus.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,10 @@ int __ssam_register_clients(struct device *parent, struct ssam_controller *ctrl,
485485
* device, so ignore it and continue with the next one.
486486
*/
487487
status = ssam_add_client_device(parent, ctrl, child);
488-
if (status && status != -ENODEV)
488+
if (status && status != -ENODEV) {
489+
fwnode_handle_put(child);
489490
goto err;
491+
}
490492
}
491493

492494
return 0;

0 commit comments

Comments
 (0)