|
@@ -1292,8 +1292,10 @@ static int rockchip_pinctrl_parse_functions(struct device_node *np,
|
|
|
func->groups[i] = child->name;
|
|
|
grp = &info->groups[grp_index++];
|
|
|
ret = rockchip_pinctrl_parse_groups(child, grp, info, i++);
|
|
|
- if (ret)
|
|
|
+ if (ret) {
|
|
|
+ of_node_put(child);
|
|
|
return ret;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
@@ -1338,6 +1340,7 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev,
|
|
|
ret = rockchip_pinctrl_parse_functions(child, info, i++);
|
|
|
if (ret) {
|
|
|
dev_err(&pdev->dev, "failed to parse function\n");
|
|
|
+ of_node_put(child);
|
|
|
return ret;
|
|
|
}
|
|
|
}
|