提交 ce16a474 编写于 作者: C Chris Leech 提交者: Dmitry Torokhov

Input: qt602240_ts - fix wrong sizeof in object table allocation

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: NChris Leech <christopher.leech@linux.intel.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 8b5fce06
...@@ -969,7 +969,7 @@ static int qt602240_initialize(struct qt602240_data *data) ...@@ -969,7 +969,7 @@ static int qt602240_initialize(struct qt602240_data *data)
return error; return error;
data->object_table = kcalloc(info->object_num, data->object_table = kcalloc(info->object_num,
sizeof(struct qt602240_data), sizeof(struct qt602240_object),
GFP_KERNEL); GFP_KERNEL);
if (!data->object_table) { if (!data->object_table) {
dev_err(&client->dev, "Failed to allocate memory\n"); dev_err(&client->dev, "Failed to allocate memory\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册