History

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 07d9ab4f0e52cb ("HID: hid-hyperv: Do not use hid_parse_report() directly").

K. Y. Srinivasan committed 14 years ago

Commit b565a391 parent 16b79bb1 file · +2 −1Browse files

Unified · Split

drivers/hid/hid-hyperv.c+2−1
@@ -516,11 +516,12 @@ static int mousevsc_probe(struct hv_device *device, · 515 unmodified lines
516516
517517 sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
518518
519+ hid_set_drvdata(hid_dev, device);
520+
519521 ret = hid_add_device(hid_dev);
520522 if (ret)
521523 goto probe_err1;
522524
523− hid_set_drvdata(hid_dev, device);
524525
525526 ret = hid_parse(hid_dev);
526527 if (ret) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t