Skip to content

Commit

Permalink
[PATCH] drivers/cdrom: kmalloc + memset -> kzalloc conversion
Browse files Browse the repository at this point in the history
Signed-off-by: Deepak Saxena <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Deepak Saxena authored and Linus Torvalds committed Nov 7, 2005
1 parent 3c76bc5 commit 5c857ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/cdrom/mcdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 */

Expand Down

0 comments on commit 5c857ee

Please sign in to comment.