Commit 8b10ca2f authored by Michael Walle's avatar Michael Walle Committed by Bartosz Golaszewski

gpiolib: fix OOB access in quirk callbacks

Commit a2b5e207 ("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: a2b5e207 ("gpiolib: rework quirk handling in of_find_gpio()")
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Tested-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent d9e7f0e3
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment