diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-02 06:26:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:42:09 -0500 |
commit | f8485350c22b25f5b9804d89cb8fdf6626d0f5cb (patch) | |
tree | 969b17561afcf17362eebf16e59570bb66272d0b /arch/powerpc/sysdev/qe_lib | |
parent | 04d76b937bdf60a8c9ac34e222e3ca977ab9ddc8 (diff) |
[POWERPC] Replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc.
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/ucc_fast.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/ucc_slow.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c index 75fa3104a43a..e657559bea93 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c | |||
@@ -216,14 +216,12 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
216 | return -EINVAL; | 216 | return -EINVAL; |
217 | } | 217 | } |
218 | 218 | ||
219 | uccf = (struct ucc_fast_private *) | 219 | uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); |
220 | kmalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); | ||
221 | if (!uccf) { | 220 | if (!uccf) { |
222 | uccf_err | 221 | uccf_err |
223 | ("ucc_fast_init: No memory for UCC slow data structure!"); | 222 | ("ucc_fast_init: No memory for UCC slow data structure!"); |
224 | return -ENOMEM; | 223 | return -ENOMEM; |
225 | } | 224 | } |
226 | memset(uccf, 0, sizeof(struct ucc_fast_private)); | ||
227 | 225 | ||
228 | /* Fill fast UCC structure */ | 226 | /* Fill fast UCC structure */ |
229 | uccf->uf_info = uf_info; | 227 | uccf->uf_info = uf_info; |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c index a49da6b73ecf..47b56203f47e 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c | |||
@@ -168,14 +168,12 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
168 | return -EINVAL; | 168 | return -EINVAL; |
169 | } | 169 | } |
170 | 170 | ||
171 | uccs = (struct ucc_slow_private *) | 171 | uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); |
172 | kmalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); | ||
173 | if (!uccs) { | 172 | if (!uccs) { |
174 | uccs_err | 173 | uccs_err |
175 | ("ucc_slow_init: No memory for UCC slow data structure!"); | 174 | ("ucc_slow_init: No memory for UCC slow data structure!"); |
176 | return -ENOMEM; | 175 | return -ENOMEM; |
177 | } | 176 | } |
178 | memset(uccs, 0, sizeof(struct ucc_slow_private)); | ||
179 | 177 | ||
180 | /* Fill slow UCC structure */ | 178 | /* Fill slow UCC structure */ |
181 | uccs->us_info = us_info; | 179 | uccs->us_info = us_info; |