File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ static int omnia_mcu_get_features(const struct i2c_client *client)
452
452
static int omnia_leds_probe (struct i2c_client * client )
453
453
{
454
454
struct device * dev = & client -> dev ;
455
- struct device_node * np = dev_of_node (dev ), * child ;
455
+ struct device_node * np = dev_of_node (dev );
456
456
struct omnia_leds * leds ;
457
457
struct omnia_led * led ;
458
458
int ret , count ;
@@ -497,12 +497,10 @@ static int omnia_leds_probe(struct i2c_client *client)
497
497
}
498
498
499
499
led = & leds -> leds [0 ];
500
- for_each_available_child_of_node (np , child ) {
500
+ for_each_available_child_of_node_scoped (np , child ) {
501
501
ret = omnia_led_register (client , led , child );
502
- if (ret < 0 ) {
503
- of_node_put (child );
502
+ if (ret < 0 )
504
503
return ret ;
505
- }
506
504
507
505
led += ret ;
508
506
}
You can’t perform that action at this time.
0 commit comments