summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-01 08:10:03 +1000
committerPaul Mackerras <paulus@samba.org>2007-08-17 11:01:51 +1000
commitcc61f957f486871536cc5531e83337fff4fe48f3 (patch)
tree266a08e5391fab28627cd1c57642d0328647e46d
parent0d279d47612d1b63155a1d9637a6fc5143dad594 (diff)
downloadlinux-cc61f957f486871536cc5531e83337fff4fe48f3.tar.gz
linux-cc61f957f486871536cc5531e83337fff4fe48f3.tar.bz2
linux-cc61f957f486871536cc5531e83337fff4fe48f3.zip
[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>
-rw-r--r--drivers/macintosh/therm_adt746x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index f25685b9b7cf..276945d51513 100644
--- 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;