Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196293
b: refs/heads/master
c: f77e347
h: refs/heads/master
i:
  196291: 090a2f2
v: v3
  • Loading branch information
Jiri Kosina committed Mar 18, 2010
1 parent 2de678f commit 3b383f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1caea61eda5c4d446147aa0e712ba395bb6b81c3
refs/heads/master: f77e347bd44e3640bdc56003b7402c63ddb1241d
13 changes: 4 additions & 9 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,8 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i

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,
Expand All @@ -1107,17 +1105,14 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
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)
Expand Down

0 comments on commit 3b383f3

Please sign in to comment.