diff options
Diffstat (limited to 'drivers/input/input-mt.c')
| -rw-r--r-- | drivers/input/input-mt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 09f518897d4a..c06e98fbd77c 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -50,7 +50,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, return -EINVAL; struct input_mt *mt __free(kfree) = - kzalloc(struct_size(mt, slots, num_slots), GFP_KERNEL); + kzalloc_flex(*mt, slots, num_slots); if (!mt) return -ENOMEM; @@ -84,7 +84,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, __set_bit(INPUT_PROP_SEMI_MT, dev->propbit); if (flags & INPUT_MT_TRACK) { unsigned int n2 = num_slots * num_slots; - mt->red = kcalloc(n2, sizeof(*mt->red), GFP_KERNEL); + mt->red = kzalloc_objs(*mt->red, n2); if (!mt->red) return -ENOMEM; } |
