diff options
author | 2021-04-04 10:04:25 +0200 | |
---|---|---|
committer | 2021-04-07 12:48:19 +0200 | |
commit | 658d04e6eb6be1601ae95d7bee92bbf4096cdc1e (patch) | |
tree | 23856a875c4fd569ae4e84246045c467be5faa23 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness (diff) | |
download | linux-dev-658d04e6eb6be1601ae95d7bee92bbf4096cdc1e.tar.xz linux-dev-658d04e6eb6be1601ae95d7bee92bbf4096cdc1e.zip |
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 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions