diff options
author | Eric Biggers <ebiggers@google.com> | 2017-05-29 19:57:19 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-05-29 20:00:10 -0700 |
commit | 2755551188d240f0098cdc6f1a2984f8a1785689 (patch) | |
tree | 6db195a95cf7c6373d076dbbf0afbba30d51d668 | |
parent | 1943d1723e7a7ee1a7b9b0ba4878dde0dc100671 (diff) | |
download | linux-2755551188d240f0098cdc6f1a2984f8a1785689.tar.gz linux-2755551188d240f0098cdc6f1a2984f8a1785689.tar.bz2 linux-2755551188d240f0098cdc6f1a2984f8a1785689.zip |
Input: synaptics - clear device info before filling in
synaptics_query_hardware() was being passed a 'struct synaptics_device_info'
in uninitialized stack memory, then not always initializing all fields.
This caused garbage to show up in certain fields, making the touchpad
unusable.
Fix by zeroing the device info, so all fields default to 0.
Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/mouse/synaptics.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 131df9d3660f..4f97970abc94 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -397,6 +397,8 @@ static int synaptics_query_hardware(struct psmouse *psmouse, { int error; + memset(info, 0, sizeof(*info)); + error = synaptics_identify(psmouse, info); if (error) return error; |