Skip to content

Commit

Permalink
Input: qt602240_ts - fix wrong sizeof in object table allocation
Browse files Browse the repository at this point in the history
The kcalloc call for the object table is using sizeof(struct qt602240_data)
when it should be using sizeof(struct qt6602240_object), resulting in a larger
allocation than is required.

Signed-off-by: Chris Leech <christopher.leech@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Chris Leech authored and Dmitry Torokhov committed Nov 18, 2010
1 parent 8b5fce0 commit ce16a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/qt602240_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ static int qt602240_initialize(struct qt602240_data *data)
return error;

data->object_table = kcalloc(info->object_num,
sizeof(struct qt602240_data),
sizeof(struct qt602240_object),
GFP_KERNEL);
if (!data->object_table) {
dev_err(&client->dev, "Failed to allocate memory\n");
Expand Down

0 comments on commit ce16a47

Please sign in to comment.