[PATCH] pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()

Simon Glass sjg at chromium.org
Wed Sep 7 23:10:43 CEST 2022


On Wed, 7 Sept 2022 at 05:15, Pali Rohár <pali at kernel.org> wrote:
>
> On Wednesday 07 September 2022 12:11:42 John Keeping wrote:
> > This buffer has the concatenated prefix and name written into it, so it
> > must be large enough to cover both strings plus the terminating NUL.
>
> You are right. Not sure why I put there sizeof("pins") (maybe old
> version when name was only pins).
>
> Reviewed-by: Pali Rohár <pali at kernel.org>
>
> > Fixes: 92c4a95ec7 ("pinctrl: Add new function pinctrl_generic_set_state_prefix()")
> > Signed-off-by: John Keeping <john at metanate.com>
> > ---
> >  drivers/pinctrl/pinctrl-generic.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list