projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58c0f5a
)
gpio: rc5t583: Remove redundant check
author
Alexander Shiyan
<shc_work@mail.ru>
Sat, 15 Feb 2014 13:24:07 +0000
(17:24 +0400)
committer
Linus Walleij
<linus.walleij@linaro.org>
Mon, 24 Feb 2014 13:51:49 +0000
(14:51 +0100)
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>
drivers/gpio/gpio-rc5t583.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpio-rc5t583.c
b/drivers/gpio/gpio-rc5t583.c
index 122b776fdc0bc6d15187b19319c2ddb8afa5b3a4..9b423173ab50a949e152645511f8badc40421d41 100644
(file)
--- 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;