Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arushi Singhal and committed by
Greg Kroah-Hartman
cf13a747 842954a8

+1 -1
+1 -1
drivers/staging/nvec/nvec_ps2.c
··· 107 107 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); 108 108 struct serio *ser_dev; 109 109 110 - ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL); 110 + ser_dev = kzalloc(sizeof(*ser_dev), GFP_KERNEL); 111 111 if (!ser_dev) 112 112 return -ENOMEM; 113 113