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@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/b7f3a78b-7163-42a0-bd09-8b3184f29661@stanley.mountain
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Dan Carpenter 2024-10-23 11:35:53 +03:00 committed by Bartosz Golaszewski
parent 101b259bce
commit 4295f4ccfe

View File

@ -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;
}