File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ static const struct attribute_group sky81452_bl_attr_group = {
182
182
static struct sky81452_bl_platform_data * sky81452_bl_parse_dt (
183
183
struct device * dev )
184
184
{
185
- struct device_node * np = of_node_get ( dev -> of_node ) ;
185
+ struct device_node * np = dev -> of_node ;
186
186
struct sky81452_bl_platform_data * pdata ;
187
187
int num_entry ;
188
188
unsigned int sources [6 ];
@@ -194,10 +194,8 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
194
194
}
195
195
196
196
pdata = devm_kzalloc (dev , sizeof (* pdata ), GFP_KERNEL );
197
- if (!pdata ) {
198
- of_node_put (np );
197
+ if (!pdata )
199
198
return ERR_PTR (- ENOMEM );
200
- }
201
199
202
200
of_property_read_string (np , "name" , & pdata -> name );
203
201
pdata -> ignore_pwm = of_property_read_bool (np , "skyworks,ignore-pwm" );
@@ -217,7 +215,6 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
217
215
num_entry );
218
216
if (ret < 0 ) {
219
217
dev_err (dev , "led-sources node is invalid.\n" );
220
- of_node_put (np );
221
218
return ERR_PTR (- EINVAL );
222
219
}
223
220
@@ -237,7 +234,6 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
237
234
if (ret < 0 )
238
235
pdata -> boost_current_limit = 2750 ;
239
236
240
- of_node_put (np );
241
237
return pdata ;
242
238
}
243
239
#else
You can’t perform that action at this time.
0 commit comments