diff --git a/drivers/gpio/gpio_nct38xx_port.c b/drivers/gpio/gpio_nct38xx_port.c index c2bc2ae03f2..561e98842c9 100644 --- a/drivers/gpio/gpio_nct38xx_port.c +++ b/drivers/gpio/gpio_nct38xx_port.c @@ -112,8 +112,9 @@ static int gpio_nct38xx_pin_config(const struct device *dev, gpio_pin_t pin, gpi } /* Set level 0:low 1:high */ - nct38xx_reg_read_byte(config->nct38xx_dev, NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), - ®); + ret = nct38xx_reg_read_byte(config->nct38xx_dev, + NCT38XX_REG_GPIO_DATA_OUT(config->gpio_port), + ®); if (ret < 0) { goto done; }