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 20:59:21 +0200 |
commit | 06b449d7f7c361dc15ea040966a46ed2c6508f3b (patch) | |
tree | 88e4fc47d08d4495f0abbac67af7559518007195 /drivers/input/serio/i8042.c | |
parent | Merge branch 'ib/6.9-disable-irq-guard' into next (diff) | |
download | linux-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/i8042.c')
-rw-r--r-- | drivers/input/serio/i8042.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9fbb8d31575a..e0fb1db653b7 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1329,7 +1329,7 @@ static int i8042_create_kbd_port(void) struct serio *serio; struct i8042_port *port = &i8042_ports[I8042_KBD_PORT_NO]; - serio = kzalloc(sizeof(struct serio), GFP_KERNEL); + serio = kzalloc(sizeof(*serio), GFP_KERNEL); if (!serio) return -ENOMEM; @@ -1359,7 +1359,7 @@ static int i8042_create_aux_port(int idx) int port_no = idx < 0 ? I8042_AUX_PORT_NO : I8042_MUX_PORT_NO + idx; struct i8042_port *port = &i8042_ports[port_no]; - serio = kzalloc(sizeof(struct serio), GFP_KERNEL); + serio = kzalloc(sizeof(*serio), GFP_KERNEL); if (!serio) return -ENOMEM; |