Re: [PATCH] [HWMON] kmalloc + memset -> kzalloc conversion

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

 



Hi Deepak,

> Signed-off-by: Deepak Saxena <[email protected]>
> 
> diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
> --- a/drivers/hwmon/adm1021.c
> +++ b/drivers/hwmon/adm1021.c
> @@ -204,11 +204,10 @@ static int adm1021_detect(struct i2c_ada
>  	   client structure, even though we cannot fill it completely yet.
>  	   But it allows us to access adm1021_{read,write}_value. */
>  
> -	if (!(data = kmalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
> +	if (!(data = kzalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
>  		err = -ENOMEM;
>  		goto error0;
>  	}
> -	memset(data, 0, sizeof(struct adm1021_data));
> (...)

OK, I'll pick that patch. Three comments however:

1* Please exclude adm9240, it is already updated in my tree.

2* Please add some comment before your Signed-off-line, explaining what
the patch is all about. It doesn't need to be long, but it needs to
exist.

3* Please include diffstat output in the patch header.

Care to respin your patch?

As a side note, I don't think it was worth sending this to Linus,
Andrew and two mailing lists. There's nothing ground breaking here.
Send this kind of patches to me as the subsystem maintainer, CC LKML
for comments if you want, and that should be sufficient.

Thanks,
-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux