aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2012-02-08 23:08:48 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-02-24 00:52:43 -0800
commit02dfc496800dfaf17b650256642f3df86653fe97 (patch)
treef706f8e345f104c8982f537a62233fd582563faf
parent68513a4c5fe68938350cf2c56d97946e49f014e1 (diff)
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>
-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 afc166fcc3d..7df5bfef262 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -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;