[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>
This commit is contained in:
committed by
Paul Mackerras
parent
04d76b937b
commit
f8485350c2
@ -216,14 +216,12 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
uccf = (struct ucc_fast_private *)
|
||||
kmalloc(sizeof(struct ucc_fast_private), GFP_KERNEL);
|
||||
uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL);
|
||||
if (!uccf) {
|
||||
uccf_err
|
||||
("ucc_fast_init: No memory for UCC slow data structure!");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(uccf, 0, sizeof(struct ucc_fast_private));
|
||||
|
||||
/* Fill fast UCC structure */
|
||||
uccf->uf_info = uf_info;
|
||||
|
@ -168,14 +168,12 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
uccs = (struct ucc_slow_private *)
|
||||
kmalloc(sizeof(struct ucc_slow_private), GFP_KERNEL);
|
||||
uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL);
|
||||
if (!uccs) {
|
||||
uccs_err
|
||||
("ucc_slow_init: No memory for UCC slow data structure!");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(uccs, 0, sizeof(struct ucc_slow_private));
|
||||
|
||||
/* Fill slow UCC structure */
|
||||
uccs->us_info = us_info;
|
||||
|
Reference in New Issue
Block a user