Messages in this thread | | | From | Grant Coady <> | Subject | Re: [PATCH] [HWMON] kmalloc + memset -> kzalloc conversion | Date | Sun, 02 Oct 2005 07:45:36 +1000 |
| |
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.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |