Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: core: add missing of_node_put() in usb_of_has_devices_or_graph
The for_each_child_of_node() macro requires an explicit call to of_node_put() on early exits to decrement the child refcount and avoid a memory leak. The child node is not required outsie the loop, and the resource must be released before the function returns. Add the missing of_node_put(). Cc: [email protected] Fixes: 82e8213 ("usb: core: Set connect_type of ports based on DT node") Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information