Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654030
| From | Alexandre TORGUE <alexandre.torgue@st.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] pinctrl: stm32: remove useless check |
| Date | 2017-05-31 11:20 +0200 |
| Message-ID | <tN7Xj-2RF-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] pinctrl: stm32: remove useless check Alexandre TORGUE <alexandre.torgue@st.com> - 2017-05-31 11:20 +0200
csiph-web