summaryrefslogtreecommitdiff
path: root/drivers/staging/nvec
diff options
context:
space:
mode:
authorArushi Singhal <arushisinghal19971997@gmail.com>2017-02-14 22:31:20 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-14 09:26:26 -0800
commitcf13a747b169e355f55ac5d6504700936d5298e3 (patch)
treeace7857de6e9abefe7d7510d745cbfbb2433d379 /drivers/staging/nvec
parent842954a8e3ec2d3a5e117c95533eb02ad73b3a2f (diff)
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>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r--drivers/staging/nvec/nvec_ps2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 499952c8ef39..3b7bce3ffd19 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -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;