summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_serial4.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-03 06:30:48 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-06-03 06:32:03 +0200
commit2960d4c8e77aba365df80b69e72f88b29011b111 (patch)
tree14be6bae95ffefa54e62d9add1589bb4523bf4c1 /drivers/input/tablet/wacom_serial4.c
parentInput: mouse - use sizeof(*pointer) instead of sizeof(type) (diff)
downloadlinux-2960d4c8e77aba365df80b69e72f88b29011b111.tar.xz
linux-2960d4c8e77aba365df80b69e72f88b29011b111.zip
Input: tablet - 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/AS8PR02MB7237B05083487507CFAF96B08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom_serial4.c')
-rw-r--r--drivers/input/tablet/wacom_serial4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_serial4.c b/drivers/input/tablet/wacom_serial4.c
index 1cedb45ba497..cf7cea77dabc 100644
--- a/drivers/input/tablet/wacom_serial4.c
+++ b/drivers/input/tablet/wacom_serial4.c
@@ -521,7 +521,7 @@ static int wacom_connect(struct serio *serio, struct serio_driver *drv)
struct input_dev *input_dev;
int err = -ENOMEM;
- wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
+ wacom = kzalloc(sizeof(*wacom), GFP_KERNEL);
input_dev = input_allocate_device();
if (!wacom || !input_dev)
goto free_device;