diff options
author | Alexandre TORGUE <alexandre.torgue@st.com> | 2017-05-31 05:10:43 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-06-09 04:03:23 -0400 |
commit | b8bfcb09a49d640a45268ad70651cef61b99b65d (patch) | |
tree | e228b4b3d90088f1060e8f9d4ae83074dbd321a4 /drivers/pinctrl/stm32 | |
parent | 6c9dc8435765603041d230f7f31326ff592dfefe (diff) |
pinctrl: stm32: remove useless check
There is no link between the number of elements of tab which contains all
pin desc (located in each pinctrl-stm32xxxx.c files) and the pin number
(defined in the tab).
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/stm32')
-rw-r--r-- | drivers/pinctrl/stm32/pinctrl-stm32.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 814f76c371c8..9b7145bc7468 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c | |||
@@ -449,11 +449,6 @@ static int stm32_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, | |||
449 | pin = STM32_GET_PIN_NO(pinfunc); | 449 | pin = STM32_GET_PIN_NO(pinfunc); |
450 | func = STM32_GET_PIN_FUNC(pinfunc); | 450 | func = STM32_GET_PIN_FUNC(pinfunc); |
451 | 451 | ||
452 | if (pin >= pctl->match_data->npins) { | ||
453 | dev_err(pctl->dev, "invalid pin number.\n"); | ||
454 | return -EINVAL; | ||
455 | } | ||
456 | |||
457 | if (!stm32_pctrl_is_function_valid(pctl, pin, func)) { | 452 | if (!stm32_pctrl_is_function_valid(pctl, pin, func)) { |
458 | dev_err(pctl->dev, "invalid function.\n"); | 453 | dev_err(pctl->dev, "invalid function.\n"); |
459 | return -EINVAL; | 454 | return -EINVAL; |