Skip to content

Commit b4859f3

Browse files
Dan Carpenterlinusw
authored andcommitted
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: ae75ff8 ("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>
1 parent a8cfcf1 commit b4859f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pinctrl/freescale/pinctrl-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static void imx_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
383383
const char *name;
384384
int i, ret;
385385

386-
if (group > pctldev->num_groups)
386+
if (group >= pctldev->num_groups)
387387
return;
388388

389389
seq_puts(s, "\n");

0 commit comments

Comments
 (0)