diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-02-01 23:23:10 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-02-03 11:02:01 +0100 |
commit | 9d27f43274e4889249dc42ca1a3989dd75c5edaf (patch) | |
tree | 0b99ca52dc1667f999f5c7288bccb1eff6bfb6c2 /drivers/hid/hid-input.c | |
parent | 3db187e7bf76ace626664ef80afbc2e1501172c6 (diff) | |
download | talos-op-linux-9d27f43274e4889249dc42ca1a3989dd75c5edaf.tar.gz talos-op-linux-9d27f43274e4889249dc42ca1a3989dd75c5edaf.zip |
HID: fix buffer allocations
When using hid_output_report(), the buffer should be allocated by hid_alloc_report_buf(),
not a custom malloc.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index d50e7313b171..a713e6211419 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1178,7 +1178,7 @@ static void hidinput_led_worker(struct work_struct *work) /* fall back to generic raw-output-report */ len = ((report->size - 1) >> 3) + 1 + (report->id > 0); - buf = kmalloc(len, GFP_KERNEL); + buf = hid_alloc_report_buf(report, GFP_KERNEL); if (!buf) return; |