summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/gscps2.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-07 19:04:23 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-06-07 20:59:21 +0200
commit06b449d7f7c361dc15ea040966a46ed2c6508f3b (patch)
tree88e4fc47d08d4495f0abbac67af7559518007195 /drivers/input/serio/gscps2.c
parentMerge branch 'ib/6.9-disable-irq-guard' into next (diff)
downloadlinux-06b449d7f7c361dc15ea040966a46ed2c6508f3b.tar.xz
linux-06b449d7f7c361dc15ea040966a46ed2c6508f3b.zip
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/gscps2.c')
-rw-r--r--drivers/input/serio/gscps2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index 633c7de49d67..d94c01eb3fc9 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -338,8 +338,8 @@ static int __init gscps2_probe(struct parisc_device *dev)
if (dev->id.sversion == 0x96)
hpa += GSC_DINO_OFFSET;
- ps2port = kzalloc(sizeof(struct gscps2port), GFP_KERNEL);
- serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
+ ps2port = kzalloc(sizeof(*ps2port), GFP_KERNEL);
+ serio = kzalloc(sizeof(*serio), GFP_KERNEL);
if (!ps2port || !serio) {
ret = -ENOMEM;
goto fail_nomem;