diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-06-03 07:30:36 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-06-03 07:32:02 +0300 |
commit | dc2f1423f056f26144f60b089430e193a4dfc672 (patch) | |
tree | 37450b22b40f403dac444c4b33f14634c103475f /drivers/input/mouse/synaptics_i2c.c | |
parent | a0bd7adadb50471331f0ca28caf068f7fab37b64 (diff) | |
download | linux-dc2f1423f056f26144f60b089430e193a4dfc672.tar.xz |
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/synaptics_i2c.c')
-rw-r--r-- | drivers/input/mouse/synaptics_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index 56e9ba396858..a0d707e47d93 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c @@ -508,7 +508,7 @@ static struct synaptics_i2c *synaptics_i2c_touch_create(struct i2c_client *clien { struct synaptics_i2c *touch; - touch = kzalloc(sizeof(struct synaptics_i2c), GFP_KERNEL); + touch = kzalloc(sizeof(*touch), GFP_KERNEL); if (!touch) return NULL; |