dect
/
linux-2.6
Archived
13
0
Fork 0

Input: evdev - fix variable initialisation

Commit 509f87c5f5 (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: Heiko Stuebner <heiko@sntech.de>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Heiko Stübner 2012-02-01 09:12:23 -08:00 committed by Dmitry Torokhov
parent 52965cc012
commit 42f578741b
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ static ssize_t evdev_read(struct file *file, 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;