buf = kmalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC);
- if (!buf) {
- report = hid_get_report(report_enum, data);
+ if (!buf)
goto nomem;
- }
/* dump the report */
snprintf(buf, HID_DEBUG_BUFSIZE - 1,
hid_debug_event(hid, buf);
}
hid_debug_event(hid, "\n");
+ kfree(buf);
+nomem:
report = hid_get_report(report_enum, data);
- if (!report) {
- kfree(buf);
+ if (!report)
return -1;
- }
-
- kfree(buf);
-nomem:
if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
ret = hdrv->raw_event(hid, report, data, size);
if (ret != 0)