提交 01312513 编写于 作者: S Sascha Hauer 提交者: Linus Walleij

pinctrl: imx: make error messages more informative

When printing error messages about errors in the devicetree also print
the offending node to give the use a hint what might be wrong.
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
Acked-by: NShawn Guo <shawn.guo@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 690ebabb
...@@ -458,7 +458,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np, ...@@ -458,7 +458,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
list = of_get_property(np, "fsl,pins", &size); list = of_get_property(np, "fsl,pins", &size);
/* we do not check return since it's safe node passed down */ /* we do not check return since it's safe node passed down */
if (!size || size % pin_size) { if (!size || size % pin_size) {
dev_err(info->dev, "Invalid fsl,pins property\n"); dev_err(info->dev, "Invalid fsl,pins property in node %s\n", np->full_name);
return -EINVAL; return -EINVAL;
} }
...@@ -526,7 +526,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np, ...@@ -526,7 +526,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
func->name = np->name; func->name = np->name;
func->num_groups = of_get_child_count(np); func->num_groups = of_get_child_count(np);
if (func->num_groups <= 0) { if (func->num_groups <= 0) {
dev_err(info->dev, "no groups defined\n"); dev_err(info->dev, "no groups defined in %s\n", np->full_name);
return -EINVAL; return -EINVAL;
} }
func->groups = devm_kzalloc(info->dev, func->groups = devm_kzalloc(info->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册