drivers/ioexpander/gpio.c: Return EINVAL if written value is not 0 nor 1.
This commit is contained in:
parent
46ba6bd6e3
commit
5bfa7a8df4
@ -251,6 +251,10 @@ static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
{
|
{
|
||||||
val = 1;
|
val = 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Write the GPIO value */
|
/* Write the GPIO value */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user