Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: renesas: rza1: Normalize return value of gpio_get()

The GPIO .get() callback is expected to return 0 or 1 (or a negative
error code). Ensure that the value returned by rza1_gpio_get() is
normalized to the [0, 1] range.

Fixes: 86ef402d805d606a ("gpiolib: sanitize the return value of gpio_chip::get()")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/aZYnyl-Nf4S1U2yj@google.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

authored by

Dmitry Torokhov and committed by
Geert Uytterhoeven
fb22bb97 ebe7561e

+1 -1
+1 -1
drivers/pinctrl/renesas/pinctrl-rza1.c
··· 589 589 { 590 590 void __iomem *mem = RZA1_ADDR(port->base, reg, port->id); 591 591 592 - return ioread16(mem) & BIT(bit); 592 + return !!(ioread16(mem) & BIT(bit)); 593 593 } 594 594 595 595 /**