]> git.baikalelectronics.ru Git - kernel.git/commit
HID: logitech-dj: prevent false errors to be shown
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 22 Aug 2014 20:16:05 +0000 (16:16 -0400)
committerJiri Kosina <jkosina@suse.cz>
Mon, 25 Aug 2014 07:59:51 +0000 (02:59 -0500)
commit99f94576a2a137c71fc2cdb0aea25cbe458b542e
tree56c7163e23cd55f49bbcb128d2bfa60a46aa67d9
parent32d1a0742193c7c9e3d5faa3b86c5dcc6fe008c4
HID: logitech-dj: prevent false errors to be shown

Commit "HID: logitech: perform bounds checking on device_id early
enough" unfortunately leaks some errors to dmesg which are not real
ones:
- if the report is not a DJ one, then there is not point in checking
  the device_id
- the receiver (index 0) can also receive some notifications which
  can be safely ignored given the current implementation

Move out the test regarding the report_id and also discards
printing errors when the receiver got notified.

Fixes: f078b8fa60336a3375f5b7bb2e5c4272d23f7146
Cc: stable@vger.kernel.org
Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-dj.c
drivers/hid/hid-logitech-dj.h