File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -279,8 +279,10 @@ static int s32_dt_node_to_map(struct pinctrl_dev *pctldev,
279
279
ret = s32_dt_group_node_to_map (pctldev , np , map ,
280
280
& reserved_maps , num_maps ,
281
281
np_config -> name );
282
- if (ret < 0 )
282
+ if (ret < 0 ) {
283
+ of_node_put (np );
283
284
break ;
285
+ }
284
286
}
285
287
286
288
if (ret )
@@ -812,8 +814,10 @@ static int s32_pinctrl_parse_functions(struct device_node *np,
812
814
groups [i ] = child -> name ;
813
815
grp = & info -> groups [info -> grp_index ++ ];
814
816
ret = s32_pinctrl_parse_groups (child , grp , info );
815
- if (ret )
817
+ if (ret ) {
818
+ of_node_put (child );
816
819
return ret ;
820
+ }
817
821
i ++ ;
818
822
}
819
823
@@ -896,8 +900,10 @@ static int s32_pinctrl_probe_dt(struct platform_device *pdev,
896
900
i = 0 ;
897
901
for_each_child_of_node (np , child ) {
898
902
ret = s32_pinctrl_parse_functions (child , info , i ++ );
899
- if (ret )
903
+ if (ret ) {
904
+ of_node_put (child );
900
905
return ret ;
906
+ }
901
907
}
902
908
903
909
return 0 ;
You can’t perform that action at this time.
0 commit comments