Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Warren and committed by
Linus Walleij
fde04f41 dd512701

+2 -2
+2 -2
drivers/pinctrl/core.c
··· 911 911 case PIN_MAP_TYPE_MUX_GROUP: 912 912 ret = pinmux_validate_map(&maps[i], i); 913 913 if (ret < 0) 914 - return 0; 914 + return ret; 915 915 break; 916 916 case PIN_MAP_TYPE_CONFIGS_PIN: 917 917 case PIN_MAP_TYPE_CONFIGS_GROUP: 918 918 ret = pinconf_validate_map(&maps[i], i); 919 919 if (ret < 0) 920 - return 0; 920 + return ret; 921 921 break; 922 922 default: 923 923 pr_err("failed to register map %s (%d): invalid type given\n",