aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas_flash.c
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-02 06:26:57 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:42:09 -0500
commitf8485350c22b25f5b9804d89cb8fdf6626d0f5cb (patch)
tree969b17561afcf17362eebf16e59570bb66272d0b /arch/powerpc/kernel/rtas_flash.c
parent04d76b937bdf60a8c9ac34e222e3ca977ab9ddc8 (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/kernel/rtas_flash.c')
-rw-r--r--arch/powerpc/kernel/rtas_flash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 6f6fc977cb39..b9561d300516 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -681,14 +681,12 @@ static int initialize_flash_pde_data(const char *rtas_call_name,
681 int *status; 681 int *status;
682 int token; 682 int token;
683 683
684 dp->data = kmalloc(buf_size, GFP_KERNEL); 684 dp->data = kzalloc(buf_size, GFP_KERNEL);
685 if (dp->data == NULL) { 685 if (dp->data == NULL) {
686 remove_flash_pde(dp); 686 remove_flash_pde(dp);
687 return -ENOMEM; 687 return -ENOMEM;
688 } 688 }
689 689
690 memset(dp->data, 0, buf_size);
691
692 /* 690 /*
693 * This code assumes that the status int is the first member of the 691 * This code assumes that the status int is the first member of the
694 * struct 692 * struct