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 @@ -1009,8 +1009,8 @@ static int rtl8366rb_setup_all_leds_off(struct realtek_priv *priv)
1009
1009
1010
1010
static int rtl8366rb_setup_leds (struct realtek_priv * priv )
1011
1011
{
1012
- struct device_node * leds_np , * led_np ;
1013
1012
struct dsa_switch * ds = & priv -> ds ;
1013
+ struct device_node * leds_np ;
1014
1014
struct dsa_port * dp ;
1015
1015
int ret = 0 ;
1016
1016
@@ -1025,13 +1025,11 @@ static int rtl8366rb_setup_leds(struct realtek_priv *priv)
1025
1025
continue ;
1026
1026
}
1027
1027
1028
- for_each_child_of_node (leds_np , led_np ) {
1028
+ for_each_child_of_node_scoped (leds_np , led_np ) {
1029
1029
ret = rtl8366rb_setup_led (priv , dp ,
1030
1030
of_fwnode_handle (led_np ));
1031
- if (ret ) {
1032
- of_node_put (led_np );
1031
+ if (ret )
1033
1032
break ;
1034
- }
1035
1033
}
1036
1034
1037
1035
of_node_put (leds_np );
You can’t perform that action at this time.
0 commit comments