From: Deepak Saxena Date: Mon, 7 Nov 2005 09:01:22 +0000 (-0800) Subject: [PATCH] drivers/cdrom: kmalloc + memset -> kzalloc conversion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c857eeb0c18adaa7432afb519db066a6349687f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] drivers/cdrom: kmalloc + memset -> kzalloc conversion Signed-off-by: Deepak Saxena Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index b89420e6d704..a0b580c22d80 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c @@ -1085,7 +1085,7 @@ static int __init mcdx_init_drive(int drive) xtrace(INIT, "kmalloc space for stuffpt's\n"); xtrace(MALLOC, "init() malloc %d bytes\n", size); - if (!(stuffp = kmalloc(size, GFP_KERNEL))) { + if (!(stuffp = kzalloc(size, GFP_KERNEL))) { xwarn("init() malloc failed\n"); return 1; } @@ -1101,8 +1101,6 @@ static int __init mcdx_init_drive(int drive) sizeof(*stuffp), stuffp); /* set default values */ - memset(stuffp, 0, sizeof(*stuffp)); - stuffp->present = 0; /* this should be 0 already */ stuffp->toc = NULL; /* this should be NULL already */