aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/pxa2xx-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/pxa2xx-flash.c')
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index 91dc6331053f..dd90880048cf 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -63,11 +63,10 @@ static int __init pxa2xx_flash_probe(struct platform_device *pdev)
63 if (!res) 63 if (!res)
64 return -ENODEV; 64 return -ENODEV;
65 65
66 info = kmalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL); 66 info = kzalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL);
67 if (!info) 67 if (!info)
68 return -ENOMEM; 68 return -ENOMEM;
69 69
70 memset(info, 0, sizeof(struct pxa2xx_flash_info));
71 info->map.name = (char *) flash->name; 70 info->map.name = (char *) flash->name;
72 info->map.bankwidth = flash->width; 71 info->map.bankwidth = flash->width;
73 info->map.phys = res->start; 72 info->map.phys = res->start;