mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
pinctrl: imx: off by one in imx_pinconf_group_dbg_show()
[ Upstream commitb4859f3edb] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
591ee8d9cd
commit
1fc16c07d6
@@ -389,7 +389,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_printf(s, "\n");
|
||||
|
||||
Reference in New Issue
Block a user