diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-11-03 16:09:58 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-11-04 11:10:19 +0100 |
commit | 8c9952b26b2be25311706082598e5e176eb92748 (patch) | |
tree | 4772fcdbf844e620671874c7ec2636c99c3f4c65 /fs/hfs | |
parent | 3e7830ceb94cd06c05832a0d53cf324db3792418 (diff) |
HID: logitech-hidpp: fix negated returns
Reported by Dan Carpenter:
drivers/hid/hid-logitech-hidpp.c:359 hidpp_root_get_protocol_version() warn: should this return really be negated?
drivers/hid/hid-logitech-hidpp.c:398 hidpp_devicenametype_get_count() warn: should this return really be negated?
drivers/hid/hid-logitech-hidpp.c:417 hidpp_devicenametype_get_device_name() warn: should this return really be negated?
drivers/hid/hid-logitech-hidpp.c:524 hidpp_touchpad_get_raw_info() warn: should this return really be negated?
The problem lies in hidpp_send_message_sync() which can return 2 types of
errors depending of their sign. Adding a comment there to clarify what is
happening.
To solve that, print an error in case of a protocol problem, and raise
-EPROTO instead.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'fs/hfs')
0 files changed, 0 insertions, 0 deletions