Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Erick Archer and committed by
Dmitry Torokhov
2960d4c8 dc2f1423

+5 -5
+1 -1
drivers/input/tablet/acecad.c
··· 129 129 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); 130 130 maxp = usb_maxpacket(dev, pipe); 131 131 132 - acecad = kzalloc(sizeof(struct usb_acecad), GFP_KERNEL); 132 + acecad = kzalloc(sizeof(*acecad), GFP_KERNEL); 133 133 input_dev = input_allocate_device(); 134 134 if (!acecad || !input_dev) { 135 135 err = -ENOMEM;
+1 -1
drivers/input/tablet/aiptek.c
··· 1673 1673 */ 1674 1674 speeds[0] = programmableDelay; 1675 1675 1676 - aiptek = kzalloc(sizeof(struct aiptek), GFP_KERNEL); 1676 + aiptek = kzalloc(sizeof(*aiptek), GFP_KERNEL); 1677 1677 inputdev = input_allocate_device(); 1678 1678 if (!aiptek || !inputdev) { 1679 1679 dev_warn(&intf->dev,
+1 -1
drivers/input/tablet/hanwang.c
··· 322 322 if (intf->cur_altsetting->desc.bNumEndpoints < 1) 323 323 return -ENODEV; 324 324 325 - hanwang = kzalloc(sizeof(struct hanwang), GFP_KERNEL); 325 + hanwang = kzalloc(sizeof(*hanwang), GFP_KERNEL); 326 326 input_dev = input_allocate_device(); 327 327 if (!hanwang || !input_dev) { 328 328 error = -ENOMEM;
+1 -1
drivers/input/tablet/kbtab.c
··· 121 121 if (!usb_endpoint_is_int_in(endpoint)) 122 122 return -ENODEV; 123 123 124 - kbtab = kzalloc(sizeof(struct kbtab), GFP_KERNEL); 124 + kbtab = kzalloc(sizeof(*kbtab), GFP_KERNEL); 125 125 input_dev = input_allocate_device(); 126 126 if (!kbtab || !input_dev) 127 127 goto fail1;
+1 -1
drivers/input/tablet/wacom_serial4.c
··· 521 521 struct input_dev *input_dev; 522 522 int err = -ENOMEM; 523 523 524 - wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); 524 + wacom = kzalloc(sizeof(*wacom), GFP_KERNEL); 525 525 input_dev = input_allocate_device(); 526 526 if (!wacom || !input_dev) 527 527 goto free_device;