提交 4fa07711 编写于 作者: D Dmitry Torokhov

Input: serio_raw - return proper result when serio_raw_write fails

If serio_raw_write was always returning number of bytes successfully
sent to serio port and never signalled error condition to the caller.
Change it so that for completely failed transfers appropriate error
code returned to the caller (partially successful writes still return
number of bytes transferred).
Reported-by: NChe-liang Chiou <clchiou@chromium.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 0c62fbf6
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册