summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/mcs_touchkey.c
diff options
context:
space:
mode:
authorJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2019-03-27 19:23:53 +0300
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2019-03-27 19:23:53 +0300
commit0e2f54f88b8b9bbdb3a73b6e67cffb402187c73f (patch)
tree6032a118853108b3659c1f6d5dd5eea549e9d077 /drivers/input/keyboard/mcs_touchkey.c
parent96fd2c6633b0484b030eb15e646ad50426c41e6a (diff)
parent0bec6219e5a0cf2dd17716949a7592807e10f3d7 (diff)
downloadlinux-0e2f54f88b8b9bbdb3a73b6e67cffb402187c73f.tar.xz
Merge drm/drm-next into drm-intel-next-queued
This is needed to get the fourcc code merged without conflicts. Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/input/keyboard/mcs_touchkey.c')
-rw-r--r--drivers/input/keyboard/mcs_touchkey.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c
index be56d4f262a7..b132662201a4 100644
--- a/drivers/input/keyboard/mcs_touchkey.c
+++ b/drivers/input/keyboard/mcs_touchkey.c
@@ -113,9 +113,8 @@ static int mcs_touchkey_probe(struct i2c_client *client,
return -EINVAL;
}
- data = kzalloc(sizeof(struct mcs_touchkey_data) +
- sizeof(data->keycodes[0]) * (pdata->key_maxval + 1),
- GFP_KERNEL);
+ data = kzalloc(struct_size(data, keycodes, pdata->key_maxval + 1),
+ GFP_KERNEL);
input_dev = input_allocate_device();
if (!data || !input_dev) {
dev_err(&client->dev, "Failed to allocate memory\n");