diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-06-02 21:29:43 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-06-02 21:32:01 -0700 |
commit | bb8706a41946d161222cdddd6b3de3025877c204 (patch) | |
tree | 0a10e7d323bf1b5313d25f2797c3880099c21af3 /drivers/input/keyboard/maple_keyb.c | |
parent | 6c7cc1a29d1e679be4a98b01141f1ba491e5775e (diff) |
Input: keyboard - use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type)
due to the type of the variable can change and one needs not
change the former (unlike the latter). This patch has no effect
on runtime behavior.
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Link: https://lore.kernel.org/r/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/maple_keyb.c')
-rw-r--r-- | drivers/input/keyboard/maple_keyb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c index d08b565be24c..91a1d2958109 100644 --- a/drivers/input/keyboard/maple_keyb.c +++ b/drivers/input/keyboard/maple_keyb.c @@ -154,7 +154,7 @@ static int probe_maple_kbd(struct device *dev) mdev = to_maple_dev(dev); mdrv = to_maple_driver(dev->driver); - kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL); + kbd = kzalloc(sizeof(*kbd), GFP_KERNEL); if (!kbd) { error = -ENOMEM; goto fail; |