diff options
| author | Alexander Shiyan <[email protected]> | 2014-02-15 13:24:07 +0000 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2014-02-24 13:51:49 +0000 |
| commit | 3bde4d26f9d7d9ebc87fbd9980d5140ba391b5d4 (patch) | |
| tree | 4fec7b9172e3e8b1f08bd0dee0442ab2e3120da8 /drivers/gpio/gpio-rc5t583.c | |
| parent | gpio: davinci: Use signed type for 'irq' variable (diff) | |
| download | kernel-3bde4d26f9d7d9ebc87fbd9980d5140ba391b5d4.tar.gz kernel-3bde4d26f9d7d9ebc87fbd9980d5140ba391b5d4.zip | |
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 <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-rc5t583.c')
| -rw-r--r-- | drivers/gpio/gpio-rc5t583.c | 2 |
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) { 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; |
