Thread (11 messages) 11 messages, 5 authors, 2021-01-27

Re: [PATCH 5/6] gpiolib: Fix return check of __irq_domain_alloc_irqs

From: Bartosz Golaszewski <hidden>
Date: 2021-01-04 13:58:40
Also in: linux-arm-kernel

On Sat, Jan 2, 2021 at 6:59 PM Adam Lackorzynski [off-list ref] wrote:
quoted hunk ↗ jump to hunk
0 is not a proper IRQ number and also indicates failure.

Signed-off-by: Adam Lackorzynski <redacted>
---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index b02cc2abd3b6..9667e1a62626 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1003,7 +1003,7 @@ static void gpiochip_set_hierarchical_irqchip(struct gpio_chip *gc,
                                                      &fwspec,
                                                      false,
                                                      NULL);
-                       if (ret < 0) {
+                       if (ret <= 0) {
                                chip_err(gc,
                                         "can not allocate irq for GPIO line %d parent hwirq %d in hierarchy domain: %d\n",
                                         i, parent_hwirq,
--
2.30.0.rc2
Hi Adam,

Does this commit depend in any way on others in this series or can I
apply it directly for fixes?

Bart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help