[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbSkLxG8YiBPvFPuRm73iBXXB3FmChHV113dLXvSnpHfw@mail.gmail.com>
Date: Fri, 16 Sep 2022 13:19:04 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Michael Walle <michael@...le.cc>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpiolib: fix OOB access in quirk callbacks
On Fri, Sep 16, 2022 at 1:01 PM Michael Walle <michael@...le.cc> wrote:
> Commit a2b5e207cade ("gpiolib: rework quirk handling in of_find_gpio()")
> introduced an array of quirk functions which get iterated over. But a
> sentinal value is missing. Add it.
>
> Fixes: a2b5e207cade ("gpiolib: rework quirk handling in of_find_gpio()")
> Signed-off-by: Michael Walle <michael@...le.cc>
Looks correct, an alternative would be to have the for-loop use
ARRAY_SIZE() but this is just as good.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists