gpio: rc5t583: Remove redundant check

Variable "offset" cannot be negative, so no need to check if it
greater than zero or equal.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Alexander Shiyan 2014-02-15 17:24:07 +04:00 committed by Linus Walleij
parent 58c0f5aa12
commit 3bde4d26f9

View 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;