summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-07-13 16:55:15 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-08-01 23:01:07 +0200
commit19da44cd33a3a6ff7c97fff0189999ff15b241e4 (patch)
tree75f39dcb2ba818d4e93570c1dc00f42ef2c60c72 /drivers
parentpinctrl: uniphier: add spi pin-mux settings (diff)
downloadlinux-19da44cd33a3a6ff7c97fff0189999ff15b241e4.tar.xz
linux-19da44cd33a3a6ff7c97fff0189999ff15b241e4.zip
pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show()
The info->groups[] array is allocated in imx1_pinctrl_parse_dt(). It has info->ngroups elements. Thus the > here should be >= to prevent reading one element beyond the end of the array. Cc: stable@vger.kernel.org Fixes: 30612cd90005 ("pinctrl: imx1 core driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Uwe Kleine-König <u.kleine-könig@pengutronix.de> Acked-by: Dong Aisheng <Aisheng.dong@nxp.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/freescale/pinctrl-imx1-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index c3bdd90b1422..deb7870b3d1a 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -429,7 +429,7 @@ static void imx1_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
const char *name;
int i, ret;
- if (group > info->ngroups)
+ if (group >= info->ngroups)
return;
seq_puts(s, "\n");