Hi, On Thu Aug 21, 2025 at 6:40 PM CEST, Linus Walleij wrote: > On Thu, Aug 21, 2025 at 12:19 PM Marcos Del Sol Vives <marcos@xxxxxxxx> wrote: > > > static int gpio_regmap_direction_output(struct gpio_chip *chip, > > unsigned int offset, int value) > > { > > - gpio_regmap_set(chip, offset, value); > > + struct gpio_regmap *gpio = gpiochip_get_data(chip); > > + int ret; > > + > > + if (gpio->flags & GPIO_REGMAP_DIR_BEFORE_SET) { > > + ret = gpio_regmap_set_direction(chip, offset, true); > > + if (ret) > > + return ret; > > + > > + return gpio_regmap_set(chip, offset, value); > > + } > > + > > + ret = gpio_regmap_set(chip, offset, value); > > + if (ret) > > + return ret; Could you add a short paragraph to the commit message that you've added error checking? Something like: While at it, add the missing error check in gpio_regmap_direction_output(). > > > > return gpio_regmap_set_direction(chip, offset, true); > > I guess this looks like this because it is just copied from > gpio-mmio.c: Yeah probably :) With that above fixed: Reviewed-by: Michael Walle <mwalle@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature