]> git.karo-electronics.de Git - karo-tx-linux.git/commit
HID: hidraw: add proper error handling to raw event reporting
authorJiri Kosina <jkosina@suse.cz>
Thu, 26 Apr 2012 22:56:08 +0000 (00:56 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:31:16 +0000 (03:31 +0100)
commitfb1c3652bb3e6690e50520c2d9a1493f15d93722
treef5468f93a5a5fa81b23af6d74952651388963a7a
parent943df77ba7b5f75e16bf47678146fb0c2af5ef70
HID: hidraw: add proper error handling to raw event reporting

commit b6787242f32700377d3da3b8d788ab3928bab849 upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hid/hid-core.c
drivers/hid/hidraw.c
include/linux/hid.h
include/linux/hidraw.h