summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/sermouse.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-03 06:30:36 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-06-03 06:32:02 +0200
commitdc2f1423f056f26144f60b089430e193a4dfc672 (patch)
tree37450b22b40f403dac444c4b33f14634c103475f /drivers/input/mouse/sermouse.c
parentInput: misc - use sizeof(*pointer) instead of sizeof(type) (diff)
downloadlinux-dc2f1423f056f26144f60b089430e193a4dfc672.tar.xz
linux-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/sermouse.c')
-rw-r--r--drivers/input/mouse/sermouse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c
index 993f90333380..218c8432a13b 100644
--- a/drivers/input/mouse/sermouse.c
+++ b/drivers/input/mouse/sermouse.c
@@ -231,7 +231,7 @@ static int sermouse_connect(struct serio *serio, struct serio_driver *drv)
unsigned char c = serio->id.extra;
int err = -ENOMEM;
- sermouse = kzalloc(sizeof(struct sermouse), GFP_KERNEL);
+ sermouse = kzalloc(sizeof(*sermouse), GFP_KERNEL);
input_dev = input_allocate_device();
if (!sermouse || !input_dev)
goto fail1;