diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-11-30 20:13:09 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-10 05:40:18 -0500 |
commit | 982c2064d9a8b51404088d132489a25e2db807fd (patch) | |
tree | 984706a0496f4f8df7d3c861d32a6d899cfe5894 /arch/sparc64/kernel/chmc.c | |
parent | d4accd60d23f3c8a576fd08b727f88096f42d445 (diff) |
[SPARC64]: Replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/chmc.c')
-rw-r--r-- | arch/sparc64/kernel/chmc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 259f37e516f5..9699abeb9907 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c | |||
@@ -341,7 +341,7 @@ static void fetch_decode_regs(struct mctrl_info *mp) | |||
341 | 341 | ||
342 | static int init_one_mctrl(struct device_node *dp) | 342 | static int init_one_mctrl(struct device_node *dp) |
343 | { | 343 | { |
344 | struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL); | 344 | struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL); |
345 | int portid = of_getintprop_default(dp, "portid", -1); | 345 | int portid = of_getintprop_default(dp, "portid", -1); |
346 | struct linux_prom64_registers *regs; | 346 | struct linux_prom64_registers *regs; |
347 | void *pval; | 347 | void *pval; |
@@ -349,7 +349,6 @@ static int init_one_mctrl(struct device_node *dp) | |||
349 | 349 | ||
350 | if (!mp) | 350 | if (!mp) |
351 | return -1; | 351 | return -1; |
352 | memset(mp, 0, sizeof(*mp)); | ||
353 | if (portid == -1) | 352 | if (portid == -1) |
354 | goto fail; | 353 | goto fail; |
355 | 354 | ||