]> git.baikalelectronics.ru Git - kernel.git/commit
HID: core: remove unneeded assignment in hid_process_report()
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Fri, 1 Jul 2022 11:27:20 +0000 (13:27 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 21 Jul 2022 11:36:49 +0000 (13:36 +0200)
commit46ecda7873e0e58ea81e09b2780c598a264457c3
tree170698de38c253f29128b690bb283d072222cf1d
parentca0f0545452d0f0ff5b631ca444850ec1d1ae0b8
HID: core: remove unneeded assignment in hid_process_report()

Commit 14d8b161226b ("HID: core: for input reports, process the usages by
priority list") split the iteration into two distinct loops in
hid_process_report().

After this change, the variable field is only used while iterating in the
second loop and the assignment of values to this variable in the first loop
is simply not needed.

Remove the unneeded assignment during retrieval. No functional change and
no change in the resulting object code.

This was discovered as a dead store with clang-analyzer.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c