projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d279d4
)
[POWERPC] drivers/macintosh/therm_adt746x.c: kmalloc + memset conversion to kzalloc
author
Mariusz Kozlowski
<m.kozlowski@tuxland.pl>
Tue, 31 Jul 2007 22:10:03 +0000
(08:10 +1000)
committer
Paul Mackerras
<paulus@samba.org>
Fri, 17 Aug 2007 01:01:51 +0000
(11:01 +1000)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/macintosh/therm_adt746x.c
patch
|
blob
|
history
diff --git
a/drivers/macintosh/therm_adt746x.c
b/drivers/macintosh/therm_adt746x.c
index f25685b9b7cf51a782c24faaa86bf9b896e4acca..276945d515130724e2c575b0a538aa8106b2449b 100644
(file)
--- a/
drivers/macintosh/therm_adt746x.c
+++ b/
drivers/macintosh/therm_adt746x.c
@@
-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;