提交 cc61f957 编写于 作者: M Mariusz Kozlowski 提交者: Paul Mackerras

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

Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 0d279d47
......@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
if (thermostat)
return 0;
th = (struct thermostat *)
kmalloc(sizeof(struct thermostat), GFP_KERNEL);
th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
if (!th)
return -ENOMEM;
memset(th, 0, sizeof(*th));
th->clt.addr = addr;
th->clt.adapter = adapter;
th->clt.driver = &thermostat_driver;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册