mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
Input: atmel_mxt_ts - set byte_offset as signed
The calculations done to obtain byte_offset can result into a negative number, fix its type. This patch fixes the following sparse error: drivers/input/touchscreen/atmel_mxt_ts.c:1481:44: warning: unsigned value that used to be signed checked against zero? drivers/input/touchscreen/atmel_mxt_ts.c:1479:49: signed value source Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20260504-fix-sparse-v1-1-1071137cd280@chromium.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
cde5e7777f
commit
e7b91b2175
|
|
@ -1397,7 +1397,8 @@ static int mxt_prepare_cfg_mem(struct mxt_data *data, struct mxt_cfg *cfg)
|
|||
{
|
||||
struct device *dev = &data->client->dev;
|
||||
struct mxt_object *object;
|
||||
unsigned int type, instance, size, byte_offset;
|
||||
unsigned int type, instance, size;
|
||||
int byte_offset;
|
||||
int offset;
|
||||
int ret;
|
||||
int i;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user