1
0
Fork 0

staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...)

Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct
serio)...) as reported by checkpatch.pl.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
zero-colors
Arushi Singhal 2017-02-14 22:31:20 +05:30 committed by Greg Kroah-Hartman
parent 842954a8e3
commit cf13a747b1
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
struct serio *ser_dev;
ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
ser_dev = kzalloc(sizeof(*ser_dev), GFP_KERNEL);
if (!ser_dev)
return -ENOMEM;