Commit 529de2f1 authored by Maximilian Weigand's avatar Maximilian Weigand Committed by Dmitry Torokhov

Input: cyttsp5 - fix array length

The cmd array should be initialized with the proper command size and not
with the actual command value that is sent to the touchscreen.
Signed-off-by: default avatarMaximilian Weigand <mweigand@mweigand.net>
Reviewed-by: default avatarAlistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/20230501113010.891786-2-mweigand@mweigand.net
Fixes: 5b0c03e2 ("Input: Add driver for Cypress Generation 5 touchscreen")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 9a87ffc9
...@@ -560,7 +560,7 @@ static int cyttsp5_hid_output_get_sysinfo(struct cyttsp5 *ts) ...@@ -560,7 +560,7 @@ static int cyttsp5_hid_output_get_sysinfo(struct cyttsp5 *ts)
static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts) static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts)
{ {
int rc; int rc;
u8 cmd[HID_OUTPUT_BL_LAUNCH_APP]; u8 cmd[HID_OUTPUT_BL_LAUNCH_APP_SIZE];
u16 crc; u16 crc;
put_unaligned_le16(HID_OUTPUT_BL_LAUNCH_APP_SIZE, cmd); put_unaligned_le16(HID_OUTPUT_BL_LAUNCH_APP_SIZE, cmd);
......
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