summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorPreetham Chandru <pchandru@nvidia.com>2012-01-12 11:47:29 +0530
committerVarun Colbert <vcolbert@nvidia.com>2012-01-13 13:42:48 -0800
commit76127876b09a54f9fee7290e23d36754b398ecee (patch)
treef87a68f3a8129a94108a9e3f7ba03c64b0eaab14 /drivers/input
parent83f2f87747962701263be1b5b4cc4d1104c4652d (diff)
input: evdev: Initialize retval to zero
In evdev_read() the local variable retval is not initialized. If this variable is not initialized then in case of NONBLOCK READ retval will have invalid value. Bug: 922453 Change-Id: I534cbfacf8a0514fcb5bc481a98d0e94a4d73b04 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: http://git-master/r/74898 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com> Tested-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Diffstat (limited to 'drivers/input')
-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 5c5f9db28075..6e7dd687d5c9 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -400,7 +400,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;