From b6787242f32700377d3da3b8d788ab3928bab849 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 27 Apr 2012 00:56:08 +0200 Subject: 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 Signed-off-by: Jiri Kosina --- include/linux/hid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/hid.h') 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) return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; } -void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, +int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, int interrupt); extern int hid_generic_init(void); -- cgit v1.2.2