Blob Blame History Raw
From c07ea8d0b170c0cf6592a53981841c7973e142ea Mon Sep 17 00:00:00 2001
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: Tue, 5 Jan 2021 11:59:14 +0100
Subject: [PATCH] gpio: gpiolib: remove shadowed variable
Git-commit: c07ea8d0b170c0cf6592a53981841c7973e142ea
Patch-mainline: v5.11-rc7
References: git-fixes

After refactoring, we had two variables for the same thing. Remove the
second declaration, one is enough here. Found by cppcheck.

drivers/gpio/gpiolib.c:2551:17: warning: Local variable 'ret' shadows outer variable [shadowVariable]

Fixes: d377f56f34f5 ("gpio: gpiolib: Normalize return code variable name")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpio/gpiolib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -3376,7 +3376,7 @@ int gpiod_get_array_value_complex(bool r
 		struct gpio_chip *chip = desc_array[i]->gdev->chip;
 		unsigned long fastpath[2 * BITS_TO_LONGS(FASTPATH_NGPIO)];
 		unsigned long *mask, *bits;
-		int first, j, ret;
+		int first, j;
 
 		if (likely(chip->ngpio <= FASTPATH_NGPIO)) {
 			mask = fastpath;