diff options
-rw-r--r-- | drivers/input/serio/serio_raw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index f6c83e9ecff6..8250299fd64f 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -224,7 +224,7 @@ static ssize_t serio_raw_write(struct file *file, const char __user *buffer, out: mutex_unlock(&serio_raw_mutex); - return written; + return written ?: retval; } static unsigned int serio_raw_poll(struct file *file, poll_table *wait) |