[POWERPC] drivers/macintosh/therm_adt746x.c: kmalloc + memset conversion to kzalloc

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Mariusz Kozlowski
2007-08-01 08:10:03 +10:00
committed by Paul Mackerras
parent 0d279d4761
commit cc61f957f4

View File

@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
if (thermostat) if (thermostat)
return 0; return 0;
th = (struct thermostat *) th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
kmalloc(sizeof(struct thermostat), GFP_KERNEL);
if (!th) if (!th)
return -ENOMEM; return -ENOMEM;
memset(th, 0, sizeof(*th));
th->clt.addr = addr; th->clt.addr = addr;
th->clt.adapter = adapter; th->clt.adapter = adapter;
th->clt.driver = &thermostat_driver; th->clt.driver = &thermostat_driver;