diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-06-07 19:04:23 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-06-07 11:59:21 -0700 |
commit | 06b449d7f7c361dc15ea040966a46ed2c6508f3b (patch) | |
tree | 88e4fc47d08d4495f0abbac67af7559518007195 /drivers/input/serio/hyperv-keyboard.c | |
parent | 18547925519acaa57c1877871c144e2646249d59 (diff) | |
download | linux-06b449d7f7c361dc15ea040966a46ed2c6508f3b.tar.gz linux-06b449d7f7c361dc15ea040966a46ed2c6508f3b.tar.bz2 linux-06b449d7f7c361dc15ea040966a46ed2c6508f3b.zip |
Input: serio - 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/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/serio/hyperv-keyboard.c')
-rw-r--r-- | drivers/input/serio/hyperv-keyboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c index 31def6ce5157..31d9dacd2fd1 100644 --- a/drivers/input/serio/hyperv-keyboard.c +++ b/drivers/input/serio/hyperv-keyboard.c @@ -318,8 +318,8 @@ static int hv_kbd_probe(struct hv_device *hv_dev, struct serio *hv_serio; int error; - kbd_dev = kzalloc(sizeof(struct hv_kbd_dev), GFP_KERNEL); - hv_serio = kzalloc(sizeof(struct serio), GFP_KERNEL); + kbd_dev = kzalloc(sizeof(*kbd_dev), GFP_KERNEL); + hv_serio = kzalloc(sizeof(*hv_serio), GFP_KERNEL); if (!kbd_dev || !hv_serio) { error = -ENOMEM; goto err_free_mem; |