aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-04-26 18:56:08 -0400
committerJiri Kosina <jkosina@suse.cz>2012-04-27 14:10:09 -0400
commitb6787242f32700377d3da3b8d788ab3928bab849 (patch)
tree54428bcff5865df64980d0af4423d52b6c1dffa5 /include/linux/hid.h
parentd4f0e4daf0d867f80c78ca4f9ac03a562e229e72 (diff)
HID: hidraw: add proper error handling to raw event reporting
If kmemdup() in hidraw_report_event() fails, we are not propagating this fact properly. Let hidraw_report_event() and hid_report_raw_event() return an error value to the caller. Reported-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 3a95da60fd3e..58b3857dc51c 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -896,7 +896,7 @@ static inline int hid_hw_power(struct hid_device *hdev, int level)
896 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; 896 return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0;
897} 897}
898 898
899void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, 899int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
900 int interrupt); 900 int interrupt);
901 901
902extern int hid_generic_init(void); 902extern int hid_generic_init(void);