diff --git a/drivers/ioexpander/gpio.c b/drivers/ioexpander/gpio.c index c650def5d8..70ebcee20a 100644 --- a/drivers/ioexpander/gpio.c +++ b/drivers/ioexpander/gpio.c @@ -251,6 +251,10 @@ static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer, { val = 1; } + else + { + return -EINVAL; + } /* Write the GPIO value */