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 <[email protected]> Reviewed-by: Maximilian Luz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 8a02d70 commit acd0acb

File tree

1 file changed

+3
-1
lines changed
  • drivers/platform/surface/aggregator

1 file changed

+3
-1
lines changed

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)