Skip to content

Commit 4df4b0f

Browse files
bulwahnJiri Kosina
authored andcommitted
HID: core: remove unneeded assignment in hid_process_report()
Commit bebcc52 ("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 <[email protected]> Reviewed-by: Tom Rix <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent aa051d3 commit 4df4b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ static void hid_process_report(struct hid_device *hid,
16621662

16631663
/* first retrieve all incoming values in data */
16641664
for (a = 0; a < report->maxfield; a++)
1665-
hid_input_fetch_field(hid, field = report->field[a], data);
1665+
hid_input_fetch_field(hid, report->field[a], data);
16661666

16671667
if (!list_empty(&report->field_entry_list)) {
16681668
/* INPUT_REPORT, we have a priority list of fields */

0 commit comments

Comments
 (0)