summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-07-19 11:16:48 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-07-29 23:23:05 +0200
commitb4859f3edb47825f62d1b2efdd75fe7945996f49 (patch)
tree0ed6b03dc34510bdd779fa7e1c08c0884b838c82
parenta8cfcf15c91455750ecb5213ad1cbe5d9b3ec2ef (diff)
downloadlinux-b4859f3edb47825f62d1b2efdd75fe7945996f49.tar.gz
linux-b4859f3edb47825f62d1b2efdd75fe7945996f49.tar.bz2
linux-b4859f3edb47825f62d1b2efdd75fe7945996f49.zip
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: 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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/freescale/pinctrl-imx.c2
1 files changed, 1 insertions, 1 deletions
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");