mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl: stm32: remove useless check
@ 2017-05-31  9:10 Alexandre TORGUE
  2017-06-09  8:03 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre TORGUE @ 2017-05-31  9:10 UTC (permalink / raw)
  To: Linus Walleij, Maxime Coquelin, Patrice Chotard, Paul Gortmaker,
	Rob Herring
  Cc: linux-kernel, linux-gpio, linux-arm-kernel, devicetree, amelie.delaunay

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>

diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index d3c5f5d..8be7ebd 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -411,11 +411,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;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: stm32: remove useless check
  2017-05-31  9:10 [PATCH] pinctrl: stm32: remove useless check Alexandre TORGUE
@ 2017-06-09  8:03 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-06-09  8:03 UTC (permalink / raw)
  To: Alexandre TORGUE
  Cc: Maxime Coquelin, Patrice Chotard, Paul Gortmaker, Rob Herring,
	linux-kernel, linux-gpio, linux-arm-kernel, devicetree,
	Amelie Delaunay

On Wed, May 31, 2017 at 11:10 AM, Alexandre TORGUE
<alexandre.torgue@st.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-09  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31  9:10 [PATCH] pinctrl: stm32: remove useless check Alexandre TORGUE
2017-06-09  8:03 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®