diff options
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 3 | ||||
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 705a43cdeea4..42bdd83444c1 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -972,6 +972,9 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
972 | hid->vendor = le16_to_cpu(dev->descriptor.idVendor); | 972 | hid->vendor = le16_to_cpu(dev->descriptor.idVendor); |
973 | hid->product = le16_to_cpu(dev->descriptor.idProduct); | 973 | hid->product = le16_to_cpu(dev->descriptor.idProduct); |
974 | hid->name[0] = 0; | 974 | hid->name[0] = 0; |
975 | if (intf->cur_altsetting->desc.bInterfaceProtocol == | ||
976 | USB_INTERFACE_PROTOCOL_MOUSE) | ||
977 | hid->type = HID_TYPE_USBMOUSE; | ||
975 | 978 | ||
976 | if (dev->manufacturer) | 979 | if (dev->manufacturer) |
977 | strlcpy(hid->name, dev->manufacturer, sizeof(hid->name)); | 980 | strlcpy(hid->name, dev->manufacturer, sizeof(hid->name)); |
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index babd65dd46ad..3ac320785fc5 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -436,8 +436,7 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, | |||
436 | if (copy_to_user(user_arg, uref, sizeof(*uref))) | 436 | if (copy_to_user(user_arg, uref, sizeof(*uref))) |
437 | goto fault; | 437 | goto fault; |
438 | 438 | ||
439 | kfree(uref_multi); | 439 | goto goodreturn; |
440 | return 0; | ||
441 | 440 | ||
442 | default: | 441 | default: |
443 | if (cmd != HIDIOCGUSAGE && | 442 | if (cmd != HIDIOCGUSAGE && |