From 68a1f2cc8676f22a6fd49f344f99e326eb7f5117 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Thu, 7 Feb 2008 16:48:46 +0100 Subject: HID: fix processing of event quirks The old code (before move) stopped further processing of the event after it has been already processed by the quirk handler. The new code didn't propagate the return value properly, and therefore the processing always proceeded, which was wrong. This patch fixes it. Pointed out in kernel.org bugzilla #9842 Signed-off-by: Jiri Kosina --- drivers/hid/hid-input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hid/hid-input.c') diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 5325d98b432..43342785110 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -854,7 +854,8 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct return; /* handle input events for quirky devices */ - hidinput_event_quirks(hid, field, usage, value); + if (hidinput_event_quirks(hid, field, usage, value)) + return; if (usage->hat_min < usage->hat_max || usage->hat_dir) { int hat_dir = usage->hat_dir; -- cgit v1.2.3