summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-elan.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-04 10:04:25 +0200
committerJiri Kosina <jkosina@suse.cz>2021-04-07 12:48:19 +0200
commit658d04e6eb6be1601ae95d7bee92bbf4096cdc1e (patch)
tree23856a875c4fd569ae4e84246045c467be5faa23 /drivers/hid/hid-elan.c
parentbbf62645255f120bc2e7488c237e3f04da42ec70 (diff)
HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
Fix the following issues with lenovo_led_set_tp10ubkbd() error handling: 1. On success hid_hw_raw_request() returns the number of bytes sent. So we should check for (ret != 3) rather then for (ret != 0). 2. Actually propagate errors to the caller. 3. Since the LEDs are part of an USB keyboard-dock the mute LEDs can go away at any time. Don't log an error when ret == -ENODEV and set the LED_HW_PLUGGABLE flag to avoid errors getting logged when the USB gets disconnected. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek BehĂșn <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-elan.c')
0 files changed, 0 insertions, 0 deletions