summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/of.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:15:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:15:21 +0000
commit1c1ddb052494b49a5dd1ab77294028c885753b28 (patch)
treefedf735083e230160517562a3dceba48a0b1418d /drivers/usb/core/of.c
parentReleasing progress-linux version 6.9.9-1~progress7.99u1. (diff)
downloadlinux-1c1ddb052494b49a5dd1ab77294028c885753b28.tar.xz
linux-1c1ddb052494b49a5dd1ab77294028c885753b28.zip
Merging upstream version 6.9.10.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/usb/core/of.c')
-rw-r--r--drivers/usb/core/of.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c
index f1a499ee48..763e4122ed 100644
--- a/drivers/usb/core/of.c
+++ b/drivers/usb/core/of.c
@@ -84,9 +84,12 @@ static bool usb_of_has_devices_or_graph(const struct usb_device *hub)
if (of_graph_is_present(np))
return true;
- for_each_child_of_node(np, child)
- if (of_property_present(child, "reg"))
+ for_each_child_of_node(np, child) {
+ if (of_property_present(child, "reg")) {
+ of_node_put(child);
return true;
+ }
+ }
return false;
}