From: Alexandre TORGUE Date: Wed, 31 May 2017 09:10:43 +0000 (+0200) Subject: pinctrl: stm32: remove useless check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b8bfcb09a49d640a45268ad70651cef61b99b65d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Linus Walleij --- 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, pin = STM32_GET_PIN_NO(pinfunc); func = STM32_GET_PIN_FUNC(pinfunc); - if (pin >= pctl->match_data->npins) { - dev_err(pctl->dev, "invalid pin number.\n"); - return -EINVAL; - } - if (!stm32_pctrl_is_function_valid(pctl, pin, func)) { dev_err(pctl->dev, "invalid function.\n"); return -EINVAL;