Skip to content

Commit c07ea8d

Browse files
Wolfram Sangbrgl
authored andcommitted
gpio: gpiolib: remove shadowed variable
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: d377f56 ("gpio: gpiolib: Normalize return code variable name") Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent c351bb6 commit c07ea8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ int gpiod_get_array_value_complex(bool raw, bool can_sleep,
25572557
struct gpio_chip *gc = desc_array[i]->gdev->chip;
25582558
unsigned long fastpath[2 * BITS_TO_LONGS(FASTPATH_NGPIO)];
25592559
unsigned long *mask, *bits;
2560-
int first, j, ret;
2560+
int first, j;
25612561

25622562
if (likely(gc->ngpio <= FASTPATH_NGPIO)) {
25632563
mask = fastpath;

0 commit comments

Comments
 (0)