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 @@ -142,7 +142,6 @@ static const struct of_device_id psci_of_match[] = {
142
142
static int psci_cpuidle_domain_probe (struct platform_device * pdev )
143
143
{
144
144
struct device_node * np = pdev -> dev .of_node ;
145
- struct device_node * node ;
146
145
bool use_osi = psci_has_osi_support ();
147
146
int ret = 0 , pd_count = 0 ;
148
147
@@ -153,15 +152,13 @@ static int psci_cpuidle_domain_probe(struct platform_device *pdev)
153
152
* Parse child nodes for the "#power-domain-cells" property and
154
153
* initialize a genpd/genpd-of-provider pair when it's found.
155
154
*/
156
- for_each_child_of_node (np , node ) {
155
+ for_each_child_of_node_scoped (np , node ) {
157
156
if (!of_property_present (node , "#power-domain-cells" ))
158
157
continue ;
159
158
160
159
ret = psci_pd_init (node , use_osi );
161
- if (ret ) {
162
- of_node_put (node );
160
+ if (ret )
163
161
goto exit ;
164
- }
165
162
166
163
pd_count ++ ;
167
164
}
You can’t perform that action at this time.
0 commit comments