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/maceps2.c | |
| parent | 18547925519acaa57c1877871c144e2646249d59 (diff) | |
| download | linux-next-06b449d7f7c361dc15ea040966a46ed2c6508f3b.tar.gz linux-next-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/maceps2.c')
| -rw-r--r-- | drivers/input/serio/maceps2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index 5ccfb82759b3..42ac1eb94866 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c @@ -117,7 +117,7 @@ static struct serio *maceps2_allocate_port(int idx) { struct serio *serio; - serio = kzalloc(sizeof(struct serio), GFP_KERNEL); + serio = kzalloc(sizeof(*serio), GFP_KERNEL); if (serio) { serio->id.type = SERIO_8042; serio->write = maceps2_write; |
