diff options
| author | Dmitry Torokhov <[email protected]> | 2021-11-11 21:58:54 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2021-11-11 21:58:54 -0800 |
| commit | efe6f16c6faf724882ddaba2eda8830a87bcc2b2 (patch) | |
| tree | ab5a4ac8c5b917b07af95c866770659f330b7f2b /drivers/input/keyboard/omap-keypad.c | |
| parent | a02dcde595f7cbd240ccd64de96034ad91cffc40 (diff) | |
| parent | 744d0090a5f6dfa4c81b53402ccdf08313100429 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 5.16 merge window.
Diffstat (limited to 'drivers/input/keyboard/omap-keypad.c')
| -rw-r--r-- | drivers/input/keyboard/omap-keypad.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index dbe836c7ff47..eb3a687796e7 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -190,8 +190,7 @@ static int omap_kp_probe(struct platform_device *pdev) row_shift = get_count_order(pdata->cols); keycodemax = pdata->rows << row_shift; - omap_kp = kzalloc(sizeof(struct omap_kp) + - keycodemax * sizeof(unsigned short), GFP_KERNEL); + omap_kp = kzalloc(struct_size(omap_kp, keymap, keycodemax), GFP_KERNEL); input_dev = input_allocate_device(); if (!omap_kp || !input_dev) { kfree(omap_kp); |