diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-06-07 19:04:23 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-06-07 11:59:21 -0700 |
commit | 06b449d7f7c361dc15ea040966a46ed2c6508f3b (patch) | |
tree | 88e4fc47d08d4495f0abbac67af7559518007195 /drivers/input/serio/q40kbd.c | |
parent | 18547925519acaa57c1877871c144e2646249d59 (diff) |
Input: serio - 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/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/serio/q40kbd.c')
-rw-r--r-- | drivers/input/serio/q40kbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 3f81f8749cd5..cd4d5be946a3 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -108,8 +108,8 @@ static int q40kbd_probe(struct platform_device *pdev) struct serio *port; int error; - q40kbd = kzalloc(sizeof(struct q40kbd), GFP_KERNEL); - port = kzalloc(sizeof(struct serio), GFP_KERNEL); + q40kbd = kzalloc(sizeof(*q40kbd), GFP_KERNEL); + port = kzalloc(sizeof(*port), GFP_KERNEL); if (!q40kbd || !port) { error = -ENOMEM; goto err_free_mem; |