Skip to content

Commit 529de2f

Browse files
m-weiganddtor
authored andcommitted
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: Maximilian Weigand <mweigand@mweigand.net> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20230501113010.891786-2-mweigand@mweigand.net Fixes: 5b0c03e ("Input: Add driver for Cypress Generation 5 touchscreen") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 9a87ffc commit 529de2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/touchscreen/cyttsp5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static int cyttsp5_hid_output_get_sysinfo(struct cyttsp5 *ts)
560560
static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts)
561561
{
562562
int rc;
563-
u8 cmd[HID_OUTPUT_BL_LAUNCH_APP];
563+
u8 cmd[HID_OUTPUT_BL_LAUNCH_APP_SIZE];
564564
u16 crc;
565565

566566
put_unaligned_le16(HID_OUTPUT_BL_LAUNCH_APP_SIZE, cmd);

0 commit comments

Comments
 (0)