From: Stefan Agner <stefan@agner.ch>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] pinctrl: imx: off by one in imx_pinconf_group_dbg_show()
Date: Wed, 25 Jul 2018 09:19:12 +0000 [thread overview]
Message-ID: <f5173c5038c9644f68bd34a88192515c@agner.ch> (raw)
In-Reply-To: <20180719081648.o6ug4z3t42mrsmop@mwanda>
On 19.07.2018 10:16, Dan Carpenter wrote:
> 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>
Reviewed-by: Stefan Agner <stefan@agner.ch>
> ---
>
> 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");
next prev parent reply other threads:[~2018-07-25 9:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 8:16 [PATCH] pinctrl: imx: off by one in imx_pinconf_group_dbg_show() Dan Carpenter
2018-07-25 9:19 ` Stefan Agner [this message]
2018-07-29 21:23 ` Linus Walleij
2018-07-30 6:41 ` Uwe Kleine-König
2018-07-30 8:47 ` A.s. Dong
2018-07-30 9:04 ` Linus Walleij
2018-07-30 9:21 ` Uwe Kleine-König
2018-07-30 9:25 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5173c5038c9644f68bd34a88192515c@agner.ch \
--to=stefan@agner.ch \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox