Commit 88e2194c authored by Jiri Kosina's avatar Jiri Kosina Committed by Greg Kroah-Hartman

HID: fix unused rsize usage

commit bc197eed upstream.

27ce4050 ("HID: fix data access in implement()") by mistake removed
a setting of buffer size in hidp. Fix that by putting it back.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2b6cada
......@@ -242,6 +242,7 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
hid_output_report(report, buf);
hdr = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT;
rsize = ((report->size - 1) >> 3) + 1 + (report->id > 0);
ret = hidp_send_intr_message(session, hdr, buf, rsize);
kfree(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment