Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Shiyan and committed by
Linus Walleij
3bde4d26 58c0f5aa

+1 -1
+1 -1
drivers/gpio/gpio-rc5t583.c
··· 97 97 { 98 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 101 return rc5t583_gpio->rc5t583->irq_base + 102 102 RC5T583_IRQ_GPIO0 + offset; 103 103 return -EINVAL;