* [PATCH] gpiolib: Fix missing array end sentinel in quirks array
@ 2022-09-20 14:27 Nicolas Frattaroli
2022-09-20 14:29 ` Nicolas Frattaroli
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Frattaroli @ 2022-09-20 14:27 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Dmitry Torokhov
Cc: Nicolas Frattaroli, linux-gpio, linux-kernel
Without the sentinel, the loop never actually terminates if there
are no quirks, and wreaks havoc across the kernel resulting in a
juicy panic.
Fix this by adding a NULL at the end.
Fixes: a2b5e207cade ("gpiolib: rework quirk handling in of_find_gpio()")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
drivers/gpio/gpiolib-of.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 95be5f0d2623..1b60cd04883f 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -498,6 +498,7 @@ static const of_find_gpio_quirk of_find_gpio_quirks[] = {
of_find_regulator_gpio,
of_find_arizona_gpio,
of_find_usb_gpio,
+ NULL,
};
struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
--
2.37.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] gpiolib: Fix missing array end sentinel in quirks array
2022-09-20 14:27 [PATCH] gpiolib: Fix missing array end sentinel in quirks array Nicolas Frattaroli
@ 2022-09-20 14:29 ` Nicolas Frattaroli
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Frattaroli @ 2022-09-20 14:29 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Dmitry Torokhov
Cc: linux-gpio, linux-kernel
On Dienstag, 20. September 2022 16:27:18 CEST Nicolas Frattaroli wrote:
> Without the sentinel, the loop never actually terminates if there
> are no quirks, and wreaks havoc across the kernel resulting in a
> juicy panic.
>
> Fix this by adding a NULL at the end.
>
> Fixes: a2b5e207cade ("gpiolib: rework quirk handling in of_find_gpio()")
> Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> ---
> drivers/gpio/gpiolib-of.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 95be5f0d2623..1b60cd04883f 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -498,6 +498,7 @@ static const of_find_gpio_quirk of_find_gpio_quirks[] = {
> of_find_regulator_gpio,
> of_find_arizona_gpio,
> of_find_usb_gpio,
> + NULL,
> };
>
> struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
>
Disregard this, just saw it was already fixed[1].
Regards,
Nicolas Frattaroli
[1]: https://lore.kernel.org/linux-gpio/CAMRc=MeF-81yottUqqYdHmuFokysyNsXTgU+FOFWv7bL=QMJOg@mail.gmail.com/T/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-20 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20 14:27 [PATCH] gpiolib: Fix missing array end sentinel in quirks array Nicolas Frattaroli
2022-09-20 14:29 ` Nicolas Frattaroli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox