[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7f3a78b-7163-42a0-bd09-8b3184f29661@stanley.mountain>
Date: Wed, 23 Oct 2024 11:35:53 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] gpio: mb86s7x: remove some dead code in mb86s70_gpio_to_irq()
The platform_get_irq() function never returns zero so delete this check.
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
I have written more about the history of platform_get_irq() on my blog:
https://staticthinking.wordpress.com/2023/08/07/writing-a-check-for-zero-irq-error-codes/
drivers/gpio/gpio-mb86s7x.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c
index 7efc9fc6f4cd..7ee891ef6905 100644
--- a/drivers/gpio/gpio-mb86s7x.c
+++ b/drivers/gpio/gpio-mb86s7x.c
@@ -145,8 +145,6 @@ static int mb86s70_gpio_to_irq(struct gpio_chip *gc, unsigned int offset)
irq = platform_get_irq(to_platform_device(gc->parent), index);
if (irq < 0)
return irq;
- if (irq == 0)
- break;
if (irq_get_irq_data(irq)->hwirq == offset)
return irq;
}
--
2.45.2
Powered by blists - more mailing lists