Loading drivers/hid/hid-core.c +4 −4 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned return NULL; } field = kzalloc((sizeof(struct hid_field) + field = kvzalloc((sizeof(struct hid_field) + usages * sizeof(struct hid_usage) + 3 * usages * sizeof(unsigned int)), GFP_KERNEL); if (!field) Loading Loading @@ -661,7 +661,7 @@ static void hid_free_report(struct hid_report *report) kfree(report->field_entries); for (n = 0; n < report->maxfield; n++) kfree(report->field[n]); kvfree(report->field[n]); kfree(report); } Loading drivers/hid/usbhid/hid-core.c +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/list.h> #include <linux/mm.h> #include <linux/mutex.h> #include <linux/property.h> #include <linux/spinlock.h> #include <asm/unaligned.h> #include <asm/byteorder.h> Loading Loading @@ -1374,6 +1375,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * hid->hiddev_report_event = hiddev_report_event; #endif hid->dev.parent = &intf->dev; device_set_node(&hid->dev, dev_fwnode(&intf->dev)); hid->bus = BUS_USB; hid->vendor = le16_to_cpu(dev->descriptor.idVendor); hid->product = le16_to_cpu(dev->descriptor.idProduct); Loading Loading
drivers/hid/hid-core.c +4 −4 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned return NULL; } field = kzalloc((sizeof(struct hid_field) + field = kvzalloc((sizeof(struct hid_field) + usages * sizeof(struct hid_usage) + 3 * usages * sizeof(unsigned int)), GFP_KERNEL); if (!field) Loading Loading @@ -661,7 +661,7 @@ static void hid_free_report(struct hid_report *report) kfree(report->field_entries); for (n = 0; n < report->maxfield; n++) kfree(report->field[n]); kvfree(report->field[n]); kfree(report); } Loading
drivers/hid/usbhid/hid-core.c +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/list.h> #include <linux/mm.h> #include <linux/mutex.h> #include <linux/property.h> #include <linux/spinlock.h> #include <asm/unaligned.h> #include <asm/byteorder.h> Loading Loading @@ -1374,6 +1375,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * hid->hiddev_report_event = hiddev_report_event; #endif hid->dev.parent = &intf->dev; device_set_node(&hid->dev, dev_fwnode(&intf->dev)); hid->bus = BUS_USB; hid->vendor = le16_to_cpu(dev->descriptor.idVendor); hid->product = le16_to_cpu(dev->descriptor.idProduct); Loading