gpio: rc5t583: Remove redundant check
[firefly-linux-kernel-4.4.55.git] / drivers / gpio / gpio-rc5t583.c
index 122b776fdc0bc6d15187b19319c2ddb8afa5b3a4..9b423173ab50a949e152645511f8badc40421d41 100644 (file)
@@ -97,7 +97,7 @@ static int rc5t583_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
 {
        struct rc5t583_gpio *rc5t583_gpio = to_rc5t583_gpio(gc);
 
-       if ((offset >= 0) && (offset < 8))
+       if (offset < RC5T583_MAX_GPIO)
                return rc5t583_gpio->rc5t583->irq_base +
                                RC5T583_IRQ_GPIO0 + offset;
        return -EINVAL;