summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinconf.c
diff options
context:
space:
mode:
authorDong Aisheng <dong.aisheng@linaro.org>2012-05-14 19:06:36 +0800
committerLinus Walleij <linus.walleij@linaro.org>2012-05-15 09:43:18 +0200
commitc95df2db2cb5a147b42374f391858232517c0576 (patch)
treeeacbb643afd225a991f538690462e9b6e7e52c81 /drivers/pinctrl/pinconf.c
parent4851680491f3629cd53b3a1283841deadd6db88c (diff)
downloadblackbird-op-linux-c95df2db2cb5a147b42374f391858232517c0576.tar.gz
blackbird-op-linux-c95df2db2cb5a147b42374f391858232517c0576.zip
pinctrl: a minor error checking improvement for pinconf
Also checking invalid num_configs when validate the pinconf map. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.c')
-rw-r--r--drivers/pinctrl/pinconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 7ce139ef7e64..43f474cdc110 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -50,9 +50,9 @@ int pinconf_validate_map(struct pinctrl_map const *map, int i)
return -EINVAL;
}
- if (map->data.configs.num_configs &&
+ if (!map->data.configs.num_configs ||
!map->data.configs.configs) {
- pr_err("failed to register map %s (%d): no configs ptr given\n",
+ pr_err("failed to register map %s (%d): no configs given\n",
map->name, i);
return -EINVAL;
}
OpenPOWER on IntegriCloud