提交 fde04f41 编写于 作者: S Stephen Warren 提交者: Linus Walleij

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: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 dd512701
...@@ -911,13 +911,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, ...@@ -911,13 +911,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
case PIN_MAP_TYPE_MUX_GROUP: case PIN_MAP_TYPE_MUX_GROUP:
ret = pinmux_validate_map(&maps[i], i); ret = pinmux_validate_map(&maps[i], i);
if (ret < 0) if (ret < 0)
return 0; return ret;
break; break;
case PIN_MAP_TYPE_CONFIGS_PIN: case PIN_MAP_TYPE_CONFIGS_PIN:
case PIN_MAP_TYPE_CONFIGS_GROUP: case PIN_MAP_TYPE_CONFIGS_GROUP:
ret = pinconf_validate_map(&maps[i], i); ret = pinconf_validate_map(&maps[i], i);
if (ret < 0) if (ret < 0)
return 0; return ret;
break; break;
default: default:
pr_err("failed to register map %s (%d): invalid type given\n", pr_err("failed to register map %s (%d): invalid type given\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册