File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,6 @@ static void sbi_pd_remove(void)
448
448
449
449
static int sbi_genpd_probe (struct device_node * np )
450
450
{
451
- struct device_node * node ;
452
451
int ret = 0 , pd_count = 0 ;
453
452
454
453
if (!np )
@@ -458,13 +457,13 @@ static int sbi_genpd_probe(struct device_node *np)
458
457
* Parse child nodes for the "#power-domain-cells" property and
459
458
* initialize a genpd/genpd-of-provider pair when it's found.
460
459
*/
461
- for_each_child_of_node (np , node ) {
460
+ for_each_child_of_node_scoped (np , node ) {
462
461
if (!of_property_present (node , "#power-domain-cells" ))
463
462
continue ;
464
463
465
464
ret = sbi_pd_init (node );
466
465
if (ret )
467
- goto put_node ;
466
+ goto remove_pd ;
468
467
469
468
pd_count ++ ;
470
469
}
@@ -480,8 +479,6 @@ static int sbi_genpd_probe(struct device_node *np)
480
479
481
480
return 0 ;
482
481
483
- put_node :
484
- of_node_put (node );
485
482
remove_pd :
486
483
sbi_pd_remove ();
487
484
pr_err ("failed to create CPU PM domains ret=%d\n" , ret );
You can’t perform that action at this time.
0 commit comments