summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Torgue <alexandre.torgue@st.com>2020-06-15 14:59:50 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-06-20 23:08:00 +0200
commitd9665bb82269f0f2bc18b73f074754e452bb3767 (patch)
treedc6179f66c7b337874573cf44310efe921db6b1b
parent2254e77665d5af6186781319d8bc109ba03008c1 (diff)
pinctrl: stm32: return proper error code in pin_config_set
".pin_config_set" or ".pin_config_group_set" can be called with a configuration not supported (i.e. PIN_CONFIG_PERSIST_STATE). In this case, it is more suitable to return -ENOTSUPP instead of -EINVAL. Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com> Link: https://lore.kernel.org/r/20200615125951.28008-2-alexandre.torgue@st.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/stm32/pinctrl-stm32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 162535e7c94d..cdf6b01d1956 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -1085,7 +1085,7 @@ static int stm32_pconf_parse_conf(struct pinctrl_dev *pctldev,
ret = stm32_pmx_gpio_set_direction(pctldev, range, pin, false);
break;
default:
- ret = -EINVAL;
+ ret = -ENOTSUPP;
}
return ret;