]> git.baikalelectronics.ru Git - kernel.git/commit
HID: intel_ish-hid: Stop using a static local buffer in get_report()
authorHans de Goede <hdegoede@redhat.com>
Sat, 14 Apr 2018 15:06:45 +0000 (17:06 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 25 Apr 2018 08:52:42 +0000 (10:52 +0200)
commit36c289580e3f0c9a7e89e086a4f9cf459bfffd62
tree9225b3e02656b05e00dfdfabbd6252b4dfcffa72
parent222f710ac8326b9d8ee59176fe87ba8fa2415ca9
HID: intel_ish-hid: Stop using a static local buffer in get_report()

hid_ishtp_get_report() may be called by multiple callers at the same
time, causing trouble with the static local buffer used.

Also there is no reason to use a non stack buffer, the buffer is tiny
and ishtp_cl_send() copies its contents so the lifetime is not an
issue either.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ishtp-hid-client.c