diff options
| author | Erick Archer <erick.archer@outlook.com> | 2024-06-02 21:30:36 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-06-02 21:32:02 -0700 |
| commit | dc2f1423f056f26144f60b089430e193a4dfc672 (patch) | |
| tree | 37450b22b40f403dac444c4b33f14634c103475f /drivers/input/mouse/alps.c | |
| parent | a0bd7adadb50471331f0ca28caf068f7fab37b64 (diff) | |
| download | linux-next-dc2f1423f056f26144f60b089430e193a4dfc672.tar.gz linux-next-dc2f1423f056f26144f60b089430e193a4dfc672.zip | |
Input: mouse - 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/AS8PR02MB7237FB736DBF67A58798FDF38BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.c')
| -rw-r--r-- | drivers/input/mouse/alps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index e2c11d9f3868..d5ef5a112d6f 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -3201,7 +3201,7 @@ int alps_detect(struct psmouse *psmouse, bool set_properties) */ psmouse_reset(psmouse); - priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL); + priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; |
