summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/apbps2.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/apbps2.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/apbps2.c')
-rw-r--r--drivers/input/serio/apbps2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index dbbb10251520..4015e75fcb90 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -165,7 +165,7 @@ static int apbps2_of_probe(struct platform_device *ofdev)
/* Set reload register to core freq in kHz/10 */
iowrite32be(freq_hz / 10000, &priv->regs->reload);
- priv->io = kzalloc(sizeof(struct serio), GFP_KERNEL);
+ priv->io = kzalloc(sizeof(*priv->io), GFP_KERNEL);
if (!priv->io)
return -ENOMEM;