mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Coady <grant_lkml@dodo.com.au>
To: Jean Delvare <khali@linux-fr.org>
Cc: Deepak Saxena <dsaxena@plexity.net>,
	Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [HWMON] kmalloc + memset -> kzalloc conversion
Date: Sun, 02 Oct 2005 07:45:36 +1000	[thread overview]
Message-ID: <ln0uj11mbrnrrah1amu53dmno6bprf560g@4ax.com> (raw)
In-Reply-To: <20051001224604.484ef912.khali@linux-fr.org>

On Sat, 1 Oct 2005 22:46:04 +0200, Jean Delvare <khali@linux-fr.org> wrote:

>Hi Deepak,
>
>> Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
>> 
>> 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))) {

	if (!(data = kzalloc(sizeof(*data), GFP_KERNEL))) {

instead?  Though lkml opinion seems to be split...

Cheers,
Grant.


  reply	other threads:[~2005-10-01 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-01  7:26 Deepak Saxena
2005-10-01 20:46 ` Jean Delvare
2005-10-01 21:45   ` Grant Coady [this message]
2005-10-01 22:36     ` Alexey Dobriyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ln0uj11mbrnrrah1amu53dmno6bprf560g@4ax.com \
    --to=grant_lkml@dodo.com.au \
    --cc=akpm@osdl.org \
    --cc=dsaxena@plexity.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®