Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: evdev - fix variable initialisation

Commit 509f87c5f564 (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>

authored by

Heiko Stübner and committed by
Dmitry Torokhov
42f57874 52965cc0

+1 -1
+1 -1
drivers/input/evdev.c
··· 386 386 struct evdev_client *client = file->private_data; 387 387 struct evdev *evdev = client->evdev; 388 388 struct input_event event; 389 - int retval; 389 + int retval = 0; 390 390 391 391 if (count < input_event_size()) 392 392 return -EINVAL;