summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorShashikirana H K <shashikiranah@chromium.org>2026-10-13 06:46:32 +0000
committerBenjamin Tissoires <bentiss@kernel.org>2026-10-28 10:37:58 +0100
commit8dbf66b011135422a28ee32da1d6aacbe08ddd7a (patch)
treea3a8380d7207f73c3dc1322915bd07595a0e860d /tools/perf/scripts/python/bin
parent8343dd786b4725c69e4352afc5a24dd796aadbcf (diff)
HID: vivaldi: Extract feature report value directly in vivaldi_feature_mapping()
Currently vivaldi_feature_mapping() passes the raw buffer returned by hid_hw_raw_request() to hid_report_raw_event() with the descriptor-declared report_len just to populate field->value[usage->usage_index]. Since vivaldi_feature_mapping() already has the target report, field, and usage in hand, and nothing else consumes field->value[] for this report, verify that hid_hw_raw_request() returns the expected report_len, ensure usage->usage_index is within field->report_count, and extract the value directly using hid_field_extract(). Also use __free(kfree) to simplify buffer cleanup. Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Fixes: 33bbe04a15f2 ("HID: google: extract Vivaldi hid feature mapping for use in hid-hammer") Cc: Tzung-Bi Shih <tzungbi@chromium.org> Cc: Sean O'Brien <seobrien@chromium.org> Signed-off-by: Shashikirana H K <shashikiranah@chromium.org> Link: https://patch.msgid.link/20261013-upstream-vivaldi-fix-v2-1-ecc20329d24c@chromium.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions