* [PATCH][next] gpio: bd70528: remove redundant assignment to variable ret
@ 2019-06-29 12:33 Colin King
2019-07-28 10:00 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-06-29 12:33 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, linux-gpio
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/gpio/gpio-bd70528.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-bd70528.c b/drivers/gpio/gpio-bd70528.c
index 633422b430b4..0c1ead12d883 100644
--- a/drivers/gpio/gpio-bd70528.c
+++ b/drivers/gpio/gpio-bd70528.c
@@ -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);
/*
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] gpio: bd70528: remove redundant assignment to variable ret
2019-06-29 12:33 [PATCH][next] gpio: bd70528: remove redundant assignment to variable ret Colin King
@ 2019-07-28 10:00 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2019-07-28 10:00 UTC (permalink / raw)
To: Colin King
Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, kernel-janitors,
linux-kernel
On Sat, Jun 29, 2019 at 2:33 PM Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-28 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-29 12:33 [PATCH][next] gpio: bd70528: remove redundant assignment to variable ret Colin King
2019-07-28 10:00 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).