aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/sa1100-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/sa1100-flash.c')
-rw-r--r--drivers/mtd/maps/sa1100-flash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index 950bf1c57841..f904e6bd02e0 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -273,14 +273,12 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
273 /* 273 /*
274 * Allocate the map_info structs in one go. 274 * Allocate the map_info structs in one go.
275 */ 275 */
276 info = kmalloc(size, GFP_KERNEL); 276 info = kzalloc(size, GFP_KERNEL);
277 if (!info) { 277 if (!info) {
278 ret = -ENOMEM; 278 ret = -ENOMEM;
279 goto out; 279 goto out;
280 } 280 }
281 281
282 memset(info, 0, size);
283
284 if (plat->init) { 282 if (plat->init) {
285 ret = plat->init(); 283 ret = plat->init();
286 if (ret) 284 if (ret)