Re: [PATCH] staging:nvec:nvec_ps2.c: Preferingkzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag, 14. Februar 2017, 22:31:20 CET schrieb Arushi Singhal:
> Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct
> serio)...) as reported by checkpatch.pl.
> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997@xxxxxxxxx>

looks like we are in a (make everyone) happy week.

Acked-by: Marc Dietrich <marvin24@xxxxxx>


> ---
>  drivers/staging/nvec/nvec_ps2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux