提交 27555511 编写于 作者: E Eric Biggers 提交者: Dmitry Torokhov

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: 6c53694f ("Input: synaptics - split device info into a separate structure")
Signed-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 1943d172
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册