diff mbox

HID: hid-sensor-hub: do not process feature reports in raw_event

Message ID alpine.LNX.2.00.1305291619040.30576@pobox.suse.cz (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Jiri Kosina May 29, 2013, 2:19 p.m. UTC
On Wed, 10 Apr 2013, Srinivas Pandruvada wrote:

> I don't know if this should be fixed in client drivers since other drivers may
> have this issue.

Agreed.

Srinivas, how about the patch below, could you please test it in your 
scenario to see whether it actually fixes the issue?

Thanks.
diff mbox

Patch

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 264f550..65879b9 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1293,7 +1293,7 @@  int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 
 	if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
 		ret = hdrv->raw_event(hid, report, data, size);
-		if (ret != 0) {
+		if (ret < 0) {
 			ret = ret < 0 ? ret : 0;
 			goto unlock;
 		}