gpio: bd70528: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Sat, 29 Jun 2019 12:33:06 +0000 (13:33 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 28 Jul 2019 09:59:50 +0000 (11:59 +0200)
Variable ret is being initialized with a value that is never read
and ret is being re-assigned a little later on. The assignment is
redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190629123306.12519-1-colin.king@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-bd70528.c

index 633422b430b4a076d0d720dcbebf58f8b2cc155e..0c1ead12d8839036382392a8d8f35c4131646fd2 100644 (file)
@@ -153,7 +153,7 @@ static int bd70528_gpio_get_i(struct bd70528_gpio *bdgpio, unsigned int offset)
 
 static int bd70528_gpio_get(struct gpio_chip *chip, unsigned int offset)
 {
-       int ret = -EINVAL;
+       int ret;
        struct bd70528_gpio *bdgpio = gpiochip_get_data(chip);
 
        /*