File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -934,7 +934,6 @@ static int sprd_pinctrl_parse_dt(struct sprd_pinctrl *sprd_pctl)
934
934
{
935
935
struct sprd_pinctrl_soc_info * info = sprd_pctl -> info ;
936
936
struct device_node * np = sprd_pctl -> dev -> of_node ;
937
- struct device_node * child , * sub_child ;
938
937
struct sprd_pin_group * grp ;
939
938
const char * * temp ;
940
939
int ret ;
@@ -962,25 +961,20 @@ static int sprd_pinctrl_parse_dt(struct sprd_pinctrl *sprd_pctl)
962
961
temp = info -> grp_names ;
963
962
grp = info -> groups ;
964
963
965
- for_each_child_of_node (np , child ) {
964
+ for_each_child_of_node_scoped (np , child ) {
966
965
ret = sprd_pinctrl_parse_groups (child , sprd_pctl , grp );
967
- if (ret ) {
968
- of_node_put (child );
966
+ if (ret )
969
967
return ret ;
970
- }
971
968
972
969
* temp ++ = grp -> name ;
973
970
grp ++ ;
974
971
975
972
if (of_get_child_count (child ) > 0 ) {
976
- for_each_child_of_node (child , sub_child ) {
973
+ for_each_child_of_node_scoped (child , sub_child ) {
977
974
ret = sprd_pinctrl_parse_groups (sub_child ,
978
975
sprd_pctl , grp );
979
- if (ret ) {
980
- of_node_put (sub_child );
981
- of_node_put (child );
976
+ if (ret )
982
977
return ret ;
983
- }
984
978
985
979
* temp ++ = grp -> name ;
986
980
grp ++ ;
You can’t perform that action at this time.
0 commit comments