提交 02dfc496 编写于 作者: H Heiko Stübner 提交者: Dmitry Torokhov

Input: evdev - fix variable initialisation

Commit 509f87c5 (evdev - do not block waiting for an event if fd
is nonblock) created a code path were it was possible to use retval
uninitialized.

This could lead to the xorg evdev input driver getting corrupt data
and refusing to work with log messages like
	AUO-Pixcir touchscreen: Read error: Success
	sg060_keys: Read error: Success
	AUO-Pixcir touchscreen: Read error: Success
	sg060_keys: Read error: Success
(for drivers auo-pixcir-ts and gpio-keys).
Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
Acked-by: NDima Zavin <dima@android.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 68513a4c
......@@ -332,7 +332,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
struct input_event event;
int retval;
int retval = 0;
if (count < input_event_size())
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册