File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ static bool thermal_of_should_bind(struct thermal_zone_device *tz,
297
297
struct thermal_cooling_device * cdev ,
298
298
struct cooling_spec * c )
299
299
{
300
- struct device_node * tz_np , * cm_np , * child ;
300
+ struct device_node * tz_np , * cm_np ;
301
301
bool result = false;
302
302
303
303
tz_np = thermal_of_zone_get_by_name (tz );
@@ -311,7 +311,7 @@ static bool thermal_of_should_bind(struct thermal_zone_device *tz,
311
311
goto out ;
312
312
313
313
/* Look up the trip and the cdev in the cooling maps. */
314
- for_each_child_of_node (cm_np , child ) {
314
+ for_each_child_of_node_scoped (cm_np , child ) {
315
315
struct device_node * tr_np ;
316
316
int count , i ;
317
317
@@ -330,7 +330,6 @@ static bool thermal_of_should_bind(struct thermal_zone_device *tz,
330
330
break ;
331
331
}
332
332
333
- of_node_put (child );
334
333
break ;
335
334
}
336
335
You can’t perform that action at this time.
0 commit comments