public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: imx: off by one in imx_pinconf_group_dbg_show()
@ 2018-07-19  8:16 Dan Carpenter
  2018-07-25  9:19 ` Stefan Agner
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Dan Carpenter @ 2018-07-19  8:16 UTC (permalink / raw)
  To: kernel-janitors

The > should really be >= here.  It's harmless because
pinctrl_generic_get_group() will return a NULL if group is invalid.

Fixes: ae75ff814538 ("pinctrl: pinctrl-imx: add imx pinctrl core driver")
Reported-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---

diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 1c6bb15579e1..b04edc22dad7 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -383,7 +383,7 @@ static void imx_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
 	const char *name;
 	int i, ret;
 
-	if (group > pctldev->num_groups)
+	if (group >= pctldev->num_groups)
 		return;
 
 	seq_puts(s, "\n");

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

end of thread, other threads:[~2018-07-30  9:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19  8:16 [PATCH] pinctrl: imx: off by one in imx_pinconf_group_dbg_show() Dan Carpenter
2018-07-25  9:19 ` Stefan Agner
2018-07-29 21:23 ` Linus Walleij
2018-07-30  6:41 ` Uwe Kleine-König
2018-07-30  8:47 ` A.s. Dong
2018-07-30  9:04 ` Linus Walleij
2018-07-30  9:21 ` Uwe Kleine-König
2018-07-30  9:25 ` Uwe Kleine-König

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