Skip to content

Commit 42f5787

Browse files
mminddtor
authored andcommitted
Input: evdev - fix variable initialisation
Commit 509f87c (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>
1 parent 52965cc commit 42f5787

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/evdev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
386386
struct evdev_client *client = file->private_data;
387387
struct evdev *evdev = client->evdev;
388388
struct input_event event;
389-
int retval;
389+
int retval = 0;
390390

391391
if (count < input_event_size())
392392
return -EINVAL;

0 commit comments

Comments
 (0)