diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-08-09 08:20:51 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-08-15 16:13:11 -0400 |
commit | 1bf1fea95ff9161fafccbcac76b37bbadc924bd0 (patch) | |
tree | 91c9abed69eb312d98495a8cc121249e80007d35 | |
parent | 01312513c4a48bdd4dbbea07716bd2dcd5d11c87 (diff) |
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: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-imx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index f1be17f6fcf1..deeb740fa94e 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c | |||
@@ -456,6 +456,11 @@ static int imx_pinctrl_parse_groups(struct device_node *np, | |||
456 | * do sanity check and calculate pins number | 456 | * do sanity check and calculate pins number |
457 | */ | 457 | */ |
458 | list = of_get_property(np, "fsl,pins", &size); | 458 | list = of_get_property(np, "fsl,pins", &size); |
459 | if (!list) { | ||
460 | dev_err(info->dev, "no fsl,pins property in node %s\n", np->full_name); | ||
461 | return -EINVAL; | ||
462 | } | ||
463 | |||
459 | /* we do not check return since it's safe node passed down */ | 464 | /* we do not check return since it's safe node passed down */ |
460 | if (!size || size % pin_size) { | 465 | if (!size || size % pin_size) { |
461 | dev_err(info->dev, "Invalid fsl,pins property in node %s\n", np->full_name); | 466 | dev_err(info->dev, "Invalid fsl,pins property in node %s\n", np->full_name); |