summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/appletouch.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/appletouch.c
parenta0bd7adadb50471331f0ca28caf068f7fab37b64 (diff)
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/appletouch.c')
-rw-r--r--drivers/input/mouse/appletouch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 627048bc6a12..e669f86f1882 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -855,7 +855,7 @@ static int atp_probe(struct usb_interface *iface,
}
/* allocate memory for our device state and initialize it */
- dev = kzalloc(sizeof(struct atp), GFP_KERNEL);
+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
input_dev = input_allocate_device();
if (!dev || !input_dev) {
dev_err(&iface->dev, "Out of memory\n");