]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
HID: fix unused rsize usage
authorJiri Kosina <jkosina@suse.cz>
Mon, 22 Jul 2013 15:11:44 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:23 +0000 (18:14 -0700)
commit bc197eedef1ae082ec662c64c3f4aa302821fb7a 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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hidp/core.c

index d0f6332bb1dfd51751f738dbb7ad4904ed30f3bc..d38ab152700698baf92f3e7dc128495f3beca713 100644 (file)
@@ -236,6 +236,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);