Commit acd0acb8 authored by Liang He's avatar Liang He Committed by Hans de Goede
Browse files

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: fc622b3d ("platform/surface: Set up Surface Aggregator device registry")
Signed-off-by: default avatarLiang He <windhl@126.com>
Reviewed-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20230322033057.1855741-1-windhl@126.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 8a02d706
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -485,9 +485,11 @@ int __ssam_register_clients(struct device *parent, struct ssam_controller *ctrl,
		 * device, so ignore it and continue with the next one.
		 */
		status = ssam_add_client_device(parent, ctrl, child);
		if (status && status != -ENODEV)
		if (status && status != -ENODEV) {
			fwnode_handle_put(child);
			goto err;
		}
	}

	return 0;
err: