summaryrefslogtreecommitdiff
path: root/drivers/input/misc/powermate.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-02 21:26:14 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-06-02 21:32:01 -0700
commita0bd7adadb50471331f0ca28caf068f7fab37b64 (patch)
tree694944053c06256e4974db49d6c8d659f2ad97a4 /drivers/input/misc/powermate.c
parentbb8706a41946d161222cdddd6b3de3025877c204 (diff)
downloadlinux-a0bd7adadb50471331f0ca28caf068f7fab37b64.tar.gz
linux-a0bd7adadb50471331f0ca28caf068f7fab37b64.tar.bz2
linux-a0bd7adadb50471331f0ca28caf068f7fab37b64.zip
Input: misc - 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/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/powermate.c')
-rw-r--r--drivers/input/misc/powermate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c
index db2ba89adaef..4b039abffc4b 100644
--- a/drivers/input/misc/powermate.c
+++ b/drivers/input/misc/powermate.c
@@ -320,7 +320,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
0, interface->desc.bInterfaceNumber, NULL, 0,
USB_CTRL_SET_TIMEOUT);
- pm = kzalloc(sizeof(struct powermate_device), GFP_KERNEL);
+ pm = kzalloc(sizeof(*pm), GFP_KERNEL);
input_dev = input_allocate_device();
if (!pm || !input_dev)
goto fail1;