Skip to content

Commit bc7f2cd

Browse files
hundebollbroonie
authored andcommitted
spi: bcm2835: remove use of uninitialized gpio flags variable
Removing the duplicate gpio chip select level handling in bcm2835_spi_setup() left the lflags variable uninitialized. Avoid trhe use of such variable by passing default flags to gpiochip_request_own_desc(). Fixes: 5e31ba0 ("spi: bcm2835: fix gpio cs level inversion") Signed-off-by: Martin Hundebøll <martin@geanix.com> Link: https://lore.kernel.org/r/20201105090615.620315-1-martin@geanix.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9bd77a9 commit bc7f2cd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/spi/spi-bcm2835.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,6 @@ static int bcm2835_spi_setup(struct spi_device *spi)
11931193
struct spi_controller *ctlr = spi->controller;
11941194
struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr);
11951195
struct gpio_chip *chip;
1196-
enum gpio_lookup_flags lflags;
11971196
u32 cs;
11981197

11991198
/*
@@ -1261,7 +1260,7 @@ static int bcm2835_spi_setup(struct spi_device *spi)
12611260

12621261
spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select,
12631262
DRV_NAME,
1264-
lflags,
1263+
GPIO_LOOKUP_FLAGS_DEFAULT,
12651264
GPIOD_OUT_LOW);
12661265
if (IS_ERR(spi->cs_gpiod))
12671266
return PTR_ERR(spi->cs_gpiod);

0 commit comments

Comments
 (0)