Commit b4859f3e authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

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: ae75ff81 ("pinctrl: pinctrl-imx: add imx pinctrl core driver")
Reported-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a8cfcf15
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment