diff options
author | Tom Rix <trix@redhat.com> | 2021-05-07 21:18:19 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-05-27 15:40:34 +0200 |
commit | 81c8bf9170477d453b24a6bc3300d201d641e645 (patch) | |
tree | e660ef31d1c8ca2210d3b79ca53c5cff31feb25b /drivers/hid/usbhid/hid-pidff.c | |
parent | HID: multitouch: Disable event reporting on suspend on the Asus T101HA touchpad (diff) | |
download | linux-81c8bf9170477d453b24a6bc3300d201d641e645.tar.xz linux-81c8bf9170477d453b24a6bc3300d201d641e645.zip |
HID: logitech-hidpp: initialize level variable
Static analysis reports this representative problem
hid-logitech-hidpp.c:1356:23: warning: Assigned value is
garbage or undefined
hidpp->battery.level = level;
^ ~~~~~
In some cases, 'level' is never set in hidpp20_battery_map_status_voltage()
Since level is not available on all hw, initialize level to unknown.
Fixes: be281368f297 ("hid-logitech-hidpp: read battery voltage from newer devices")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Filipe LaĆns <lains@riseup.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hid-pidff.c')
0 files changed, 0 insertions, 0 deletions