提交 b565a390 编写于 作者: K K. Y. Srinivasan 提交者: Jiri Kosina

HID: hyperv: Set the hid drvdata correctly

Set the hid drvdata prior to invoking hid_add_device() as hid_add_device()
expects this state to be set. This bug was introduced in the recent hid
changes that were made in 07d9ab4f ("HID: hid-hyperv: Do not use
hid_parse_report() directly").
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 16b79bb8
......@@ -516,11 +516,12 @@ static int mousevsc_probe(struct hv_device *device,
sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
hid_set_drvdata(hid_dev, device);
ret = hid_add_device(hid_dev);
if (ret)
goto probe_err1;
hid_set_drvdata(hid_dev, device);
ret = hid_parse(hid_dev);
if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册