Commit 1bf1fea9 authored by Sascha Hauer's avatar Sascha Hauer Committed by Linus Walleij

pinctrl: imx: Catch no fsl,pins property

Instead of crashing the kernel print an error message when
the fsl,pins property is missing.
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 01312513
...@@ -456,6 +456,11 @@ static int imx_pinctrl_parse_groups(struct device_node *np, ...@@ -456,6 +456,11 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
* do sanity check and calculate pins number * do sanity check and calculate pins number
*/ */
list = of_get_property(np, "fsl,pins", &size); list = of_get_property(np, "fsl,pins", &size);
if (!list) {
dev_err(info->dev, "no fsl,pins property in node %s\n", np->full_name);
return -EINVAL;
}
/* 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 in node %s\n", np->full_name); dev_err(info->dev, "Invalid fsl,pins property in node %s\n", np->full_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment