summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/focaltech.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-02 21:30:36 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-06-02 21:32:02 -0700
commitdc2f1423f056f26144f60b089430e193a4dfc672 (patch)
tree37450b22b40f403dac444c4b33f14634c103475f /drivers/input/mouse/focaltech.c
parenta0bd7adadb50471331f0ca28caf068f7fab37b64 (diff)
downloadlwn-dc2f1423f056f26144f60b089430e193a4dfc672.tar.gz
lwn-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/focaltech.c')
-rw-r--r--drivers/input/mouse/focaltech.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c
index c74b99077d16..356b99d48544 100644
--- a/drivers/input/mouse/focaltech.c
+++ b/drivers/input/mouse/focaltech.c
@@ -408,8 +408,7 @@ int focaltech_init(struct psmouse *psmouse)
struct focaltech_data *priv;
int error;
- psmouse->private = priv = kzalloc(sizeof(struct focaltech_data),
- GFP_KERNEL);
+ psmouse->private = priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;