summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-74x164.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-03-02 20:25:12 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-02 20:25:12 +0300
commit705c72567be6a31a73ce57fa6a2441498479dd71 (patch)
treecef8dfc6ab0c269d1c6e9d053cf70ac9a69100fb /drivers/gpio/gpio-74x164.c
parent7838b4656110d950afdd92a081cc0f33e23e0ea8 (diff)
parentec5c54a9d3c4f9c15e647b049fea401ee5258696 (diff)
downloadlinux-705c72567be6a31a73ce57fa6a2441498479dd71.tar.xz
Merge tag 'gpio-fixes-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: - fix resource freeing ordering in error path when adding a GPIO chip - only set pins to output after the reset is complete in gpio-74x164 * tag 'gpio-fixes-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: fix resource unwinding order in error path gpiolib: Fix the error path order in gpiochip_add_data_with_key() gpio: 74x164: Enable output pins after registers are reset
Diffstat (limited to 'drivers/gpio/gpio-74x164.c')
-rw-r--r--drivers/gpio/gpio-74x164.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index e00c33310517..753e7be039e4 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -127,8 +127,6 @@ static int gen_74x164_probe(struct spi_device *spi)
if (IS_ERR(chip->gpiod_oe))
return PTR_ERR(chip->gpiod_oe);
- gpiod_set_value_cansleep(chip->gpiod_oe, 1);
-
spi_set_drvdata(spi, chip);
chip->gpio_chip.label = spi->modalias;
@@ -153,6 +151,8 @@ static int gen_74x164_probe(struct spi_device *spi)
goto exit_destroy;
}
+ gpiod_set_value_cansleep(chip->gpiod_oe, 1);
+
ret = gpiochip_add_data(&chip->gpio_chip, chip);
if (!ret)
return 0;