Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316038
b: refs/heads/master
c: b94e3c9
h: refs/heads/master
v: v3
  • Loading branch information
Matthieu CASTET authored and Jiri Kosina committed Jul 20, 2012
1 parent d3561ec commit 3bf4024
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 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: 4c7b417ecb756e85dfc955b0e7a04fd45585533e
refs/heads/master: b94e3c94aae04a911d61f620f4ff5b575fc196ad
10 changes: 8 additions & 2 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,10 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
goto out;
}

for (a = 0; a < report->maxfield; a++)
hid_input_field(hid, report->field[a], cdata, interrupt);
if (hid->claimed != HID_CLAIMED_HIDRAW) {
for (a = 0; a < report->maxfield; a++)
hid_input_field(hid, report->field[a], cdata, interrupt);
}

if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_report_event(hid, report);
Expand Down Expand Up @@ -1243,6 +1245,10 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
goto unlock;
}

/* Avoid unnecessary overhead if debugfs is disabled */
if (list_empty(&hid->debug_list))
goto nomem;

buf = kmalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC);

if (!buf)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hid/hid-picolcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ static void picolcd_debug_out_report(struct picolcd_data *data,
#define BUFF_SZ 256

/* Avoid unnecessary overhead if debugfs is disabled */
if (!hdev->debug_events)
if (list_empty(&hdev->debug_list))
return;

buff = kmalloc(BUFF_SZ, GFP_ATOMIC);
Expand Down

0 comments on commit 3bf4024

Please sign in to comment.