summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/hanwang.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/hanwang.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/hanwang.c')
-rw-r--r--drivers/input/tablet/hanwang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c
index 9bc631518b92..42c1e5eaddd5 100644
--- a/drivers/input/tablet/hanwang.c
+++ b/drivers/input/tablet/hanwang.c
@@ -322,7 +322,7 @@ static int hanwang_probe(struct usb_interface *intf, const struct usb_device_id
if (intf->cur_altsetting->desc.bNumEndpoints < 1)
return -ENODEV;
- hanwang = kzalloc(sizeof(struct hanwang), GFP_KERNEL);
+ hanwang = kzalloc(sizeof(*hanwang), GFP_KERNEL);
input_dev = input_allocate_device();
if (!hanwang || !input_dev) {
error = -ENOMEM;