From 95b93a0cd46682c6d9e8eea803fda510cb6b863a Mon Sep 17 00:00:00 2001 From: Burman Yan Date: Wed, 15 Nov 2006 21:10:29 +0200 Subject: [MTD] replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman Signed-off-by: David Woodhouse --- drivers/mtd/devices/phram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/mtd/devices/phram.c') diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 6c7337f9ebbb..56cc1ca7ffd5 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -126,12 +126,10 @@ static int register_device(char *name, unsigned long start, unsigned long len) struct phram_mtd_list *new; int ret = -ENOMEM; - new = kmalloc(sizeof(*new), GFP_KERNEL); + new = kzalloc(sizeof(*new), GFP_KERNEL); if (!new) goto out0; - memset(new, 0, sizeof(*new)); - ret = -EIO; new->mtd.priv = ioremap(start, len); if (!new->mtd.priv) { -- cgit v1.2.2