summaryrefslogtreecommitdiffstats
path: root/include/linux/hidraw.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-04-27 00:56:08 +0200
committerJiri Kosina <jkosina@suse.cz>2012-04-27 20:10:09 +0200
commitb6787242f32700377d3da3b8d788ab3928bab849 (patch)
tree54428bcff5865df64980d0af4423d52b6c1dffa5 /include/linux/hidraw.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/hidraw.h')
-rw-r--r--include/linux/hidraw.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h
index 4b88e697c4e..9cdc9b67ff4 100644
--- a/include/linux/hidraw.h
+++ b/include/linux/hidraw.h
@@ -76,13 +76,13 @@ struct hidraw_list {
#ifdef CONFIG_HIDRAW
int hidraw_init(void);
void hidraw_exit(void);
-void hidraw_report_event(struct hid_device *, u8 *, int);
+int hidraw_report_event(struct hid_device *, u8 *, int);
int hidraw_connect(struct hid_device *);
void hidraw_disconnect(struct hid_device *);
#else
static inline int hidraw_init(void) { return 0; }
static inline void hidraw_exit(void) { }
-static inline void hidraw_report_event(struct hid_device *hid, u8 *data, int len) { }
+static inline int hidraw_report_event(struct hid_device *hid, u8 *data, int len) { }
static inline int hidraw_connect(struct hid_device *hid) { return -1; }
static inline void hidraw_disconnect(struct hid_device *hid) { }
#endif