]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: mpsse: propagate error from direction_input
authorMary Strodl <mstrodl@csh.rit.edu>
Tue, 14 Oct 2025 13:35:27 +0000 (09:35 -0400)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 21 Oct 2025 12:10:45 +0000 (14:10 +0200)
Not sure how I missed this, but errors encountered when setting the
direction to input weren't being propagated to the caller.

Signed-off-by: Mary Strodl <mstrodl@csh.rit.edu>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20251014133530.3592716-2-mstrodl@csh.rit.edu
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-mpsse.c

index 9f42bb30b4ec7c6d23cdd02a9995ac380f800f8f..c508d9e330542bf76cdcb36a18caf6a0cdeac0b2 100644 (file)
@@ -261,9 +261,8 @@ static int gpio_mpsse_direction_input(struct gpio_chip *chip,
 
        guard(mutex)(&priv->io_mutex);
        priv->gpio_dir[bank] &= ~BIT(bank_offset);
-       gpio_mpsse_set_bank(priv, bank);
 
-       return 0;
+       return gpio_mpsse_set_bank(priv, bank);
 }
 
 static int gpio_mpsse_get_direction(struct gpio_chip *chip,