]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof...
authorArushi Singhal <arushisinghal19971997@gmail.com>
Tue, 14 Feb 2017 17:01:20 +0000 (22:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2017 17:26:26 +0000 (09:26 -0800)
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>
drivers/staging/nvec/nvec_ps2.c

index 499952c8ef3915ba54afe52347bc220cbad1387c..3b7bce3ffd1912143bb823e04d42ba14188f9f03 100644 (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;