drivers: gpio_nct38xx_port: Fix checking wrong return
Fix error check for previous function return code. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
61f89b7b18
commit
63f360c7fc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue