aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-02-15 08:24:07 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-24 08:51:49 -0500
commit3bde4d26f9d7d9ebc87fbd9980d5140ba391b5d4 (patch)
tree4fec7b9172e3e8b1f08bd0dee0442ab2e3120da8 /drivers/gpio
parent58c0f5aa124534af16d7faaf1abdfa0d9fec8290 (diff)
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-rc5t583.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-rc5t583.c b/drivers/gpio/gpio-rc5t583.c
index 122b776fdc0b..9b423173ab50 100644
--- a/drivers/gpio/gpio-rc5t583.c
+++ b/drivers/gpio/gpio-rc5t583.c
@@ -97,7 +97,7 @@ static int rc5t583_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
97{ 97{
98 struct rc5t583_gpio *rc5t583_gpio = to_rc5t583_gpio(gc); 98 struct rc5t583_gpio *rc5t583_gpio = to_rc5t583_gpio(gc);
99 99
100 if ((offset >= 0) && (offset < 8)) 100 if (offset < RC5T583_MAX_GPIO)
101 return rc5t583_gpio->rc5t583->irq_base + 101 return rc5t583_gpio->rc5t583->irq_base +
102 RC5T583_IRQ_GPIO0 + offset; 102 RC5T583_IRQ_GPIO0 + offset;
103 return -EINVAL; 103 return -EINVAL;