File tree Expand file tree Collapse file tree 6 files changed +20
-3
lines changed
arch/powerpc/platforms/powernv Expand file tree Collapse file tree 6 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -1419,6 +1419,7 @@ static int __init pnv_parse_cpuidle_dt(void)
1419
1419
kfree (temp_u32 );
1420
1420
kfree (temp_u64 );
1421
1421
kfree (temp_string );
1422
+ of_node_put (np );
1422
1423
return rc ;
1423
1424
}
1424
1425
Original file line number Diff line number Diff line change @@ -348,6 +348,8 @@ static int __init create_opalcore(void)
348
348
if (!dn || ret )
349
349
pr_warn ("WARNING: Failed to read OPAL base & entry values\n" );
350
350
351
+ of_node_put (dn );
352
+
351
353
/* Use count to keep track of the program headers */
352
354
count = 0 ;
353
355
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ void __init opal_powercap_init(void)
153
153
pcaps = kcalloc (of_get_child_count (powercap ), sizeof (* pcaps ),
154
154
GFP_KERNEL );
155
155
if (!pcaps )
156
- return ;
156
+ goto out_put_powercap ;
157
157
158
158
powercap_kobj = kobject_create_and_add ("powercap" , opal_kobj );
159
159
if (!powercap_kobj ) {
@@ -226,6 +226,7 @@ void __init opal_powercap_init(void)
226
226
}
227
227
i ++ ;
228
228
}
229
+ of_node_put (powercap );
229
230
230
231
return ;
231
232
@@ -236,6 +237,9 @@ void __init opal_powercap_init(void)
236
237
kfree (pcaps [i ].pg .name );
237
238
}
238
239
kobject_put (powercap_kobj );
240
+ of_node_put (node );
239
241
out_pcaps :
240
242
kfree (pcaps );
243
+ out_put_powercap :
244
+ of_node_put (powercap );
241
245
}
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ void __init opal_psr_init(void)
135
135
psr_attrs = kcalloc (of_get_child_count (psr ), sizeof (* psr_attrs ),
136
136
GFP_KERNEL );
137
137
if (!psr_attrs )
138
- return ;
138
+ goto out_put_psr ;
139
139
140
140
psr_kobj = kobject_create_and_add ("psr" , opal_kobj );
141
141
if (!psr_kobj ) {
@@ -162,10 +162,14 @@ void __init opal_psr_init(void)
162
162
}
163
163
i ++ ;
164
164
}
165
+ of_node_put (psr );
165
166
166
167
return ;
167
168
out_kobj :
169
+ of_node_put (node );
168
170
kobject_put (psr_kobj );
169
171
out :
170
172
kfree (psr_attrs );
173
+ out_put_psr :
174
+ of_node_put (psr );
171
175
}
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ void __init opal_sensor_groups_init(void)
170
170
171
171
sgs = kcalloc (of_get_child_count (sg ), sizeof (* sgs ), GFP_KERNEL );
172
172
if (!sgs )
173
- return ;
173
+ goto out_sg_put ;
174
174
175
175
sg_kobj = kobject_create_and_add ("sensor_groups" , opal_kobj );
176
176
if (!sg_kobj ) {
@@ -222,6 +222,7 @@ void __init opal_sensor_groups_init(void)
222
222
}
223
223
i ++ ;
224
224
}
225
+ of_node_put (sg );
225
226
226
227
return ;
227
228
@@ -231,6 +232,9 @@ void __init opal_sensor_groups_init(void)
231
232
kfree (sgs [i ].sg .attrs );
232
233
}
233
234
kobject_put (sg_kobj );
235
+ of_node_put (node );
234
236
out_sgs :
235
237
kfree (sgs );
238
+ out_sg_put :
239
+ of_node_put (sg );
236
240
}
Original file line number Diff line number Diff line change @@ -952,6 +952,8 @@ static void __init opal_imc_init_dev(void)
952
952
np = of_find_compatible_node (NULL , NULL , IMC_DTB_COMPAT );
953
953
if (np )
954
954
of_platform_device_create (np , NULL , NULL );
955
+
956
+ of_node_put (np );
955
957
}
956
958
957
959
static int kopald (void * unused )
You can’t perform that action at this time.
0 commit comments