Commit cc61f957 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by Paul Mackerras

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

Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 0d279d47
...@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment