summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-25 10:32:16 -0600
committerLinus Walleij <linus.walleij@linaro.org>2012-04-26 10:49:28 +0200
commitfde04f419a230fb7f7dc018a9deca6f5d431831e (patch)
treeaf45fe8050d4d15b427cc7f11bdc502d06270d60 /drivers/pinctrl/core.c
parentdd5127010afa560b1cfde7e2cffeadabdd20885d (diff)
downloadlinux-fde04f419a230fb7f7dc018a9deca6f5d431831e.tar.bz2
pinctrl: propagate map validation errors
pinctrl_register_map() was returning early if pinmux_validate_map() or pinconf_validate_map() failed, but was not actually returning the error code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 5cd5a5a3a403..913c83e2bf1c 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -911,13 +911,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
case PIN_MAP_TYPE_MUX_GROUP:
ret = pinmux_validate_map(&maps[i], i);
if (ret < 0)
- return 0;
+ return ret;
break;
case PIN_MAP_TYPE_CONFIGS_PIN:
case PIN_MAP_TYPE_CONFIGS_GROUP:
ret = pinconf_validate_map(&maps[i], i);
if (ret < 0)
- return 0;
+ return ret;
break;
default:
pr_err("failed to register map %s (%d): invalid type given\n",