File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,6 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
472
472
static int build_changeset_next_level (struct overlay_changeset * ovcs ,
473
473
struct target * target , const struct device_node * overlay_node )
474
474
{
475
- struct device_node * child ;
476
475
struct property * prop ;
477
476
int ret ;
478
477
@@ -485,12 +484,11 @@ static int build_changeset_next_level(struct overlay_changeset *ovcs,
485
484
}
486
485
}
487
486
488
- for_each_child_of_node (overlay_node , child ) {
487
+ for_each_child_of_node_scoped (overlay_node , child ) {
489
488
ret = add_changeset_node (ovcs , target , child );
490
489
if (ret ) {
491
490
pr_debug ("Failed to apply node @%pOF/%pOFn, err=%d\n" ,
492
491
target -> np , child , ret );
493
- of_node_put (child );
494
492
return ret ;
495
493
}
496
494
}
@@ -1078,16 +1076,12 @@ EXPORT_SYMBOL_GPL(of_overlay_fdt_apply);
1078
1076
*/
1079
1077
static int find_node (struct device_node * tree , struct device_node * np )
1080
1078
{
1081
- struct device_node * child ;
1082
-
1083
1079
if (tree == np )
1084
1080
return 1 ;
1085
1081
1086
- for_each_child_of_node (tree , child ) {
1087
- if (find_node (child , np )) {
1088
- of_node_put (child );
1082
+ for_each_child_of_node_scoped (tree , child ) {
1083
+ if (find_node (child , np ))
1089
1084
return 1 ;
1090
- }
1091
1085
}
1092
1086
1093
1087
return 0 ;
You can’t perform that action at this time.
0 commit comments