aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stuebner2012-02-01 12:33:01 -0600
committerPraneeth Bajjuri2012-02-02 13:35:12 -0600
commitcc321a98624689df16e5dc52ec8fb7580eb94c4e (patch)
treed8fc9d94de2ec7eb9d6303e2ef7050d19cbd5f5c
parent0402e9ea48d16298ee21dd8002ab753539358eb8 (diff)
downloadkernel-common-android-3.1.tar.gz
kernel-common-android-3.1.tar.xz
kernel-common-android-3.1.zip
Input: evdev - fix variable initialisationandroid-3.1
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>
-rw-r--r--drivers/input/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index d497c972e71..6288d7d84fa 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -404,7 +404,7 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
404 struct evdev_client *client = file->private_data; 404 struct evdev_client *client = file->private_data;
405 struct evdev *evdev = client->evdev; 405 struct evdev *evdev = client->evdev;
406 struct input_event event; 406 struct input_event event;
407 int retval; 407 int retval = 0;
408 408
409 if (count < input_event_size()) 409 if (count < input_event_size())
410 return -EINVAL; 410 return -EINVAL;