mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
pinctrl: imx: off by one in imx_pinconf_group_dbg_show()
The > should really be >= here. It's harmless because
pinctrl_generic_get_group() will return a NULL if group is invalid.
Fixes: ae75ff8145 ("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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
committed by
Linus Walleij
parent
a8cfcf15c9
commit
b4859f3edb
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user