Merge branch 'bugzilla-21212' into release
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / maps / pxa2xx-flash.c
index 91dc6331053f512fc881ee6b28376da93616c294..d8ae634d347ebc4262704188adb1dea943c909e6 100644 (file)
@@ -51,7 +51,7 @@ struct pxa2xx_flash_info {
 static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
 
 
-static int __init pxa2xx_flash_probe(struct platform_device *pdev)
+static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
 {
        struct flash_platform_data *flash = pdev->dev.platform_data;
        struct pxa2xx_flash_info *info;
@@ -63,11 +63,10 @@ static int __init pxa2xx_flash_probe(struct platform_device *pdev)
        if (!res)
                return -ENODEV;
 
-       info = kmalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL);
+       info = kzalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       memset(info, 0, sizeof(struct pxa2xx_flash_info));
        info->map.name = (char *) flash->name;
        info->map.bankwidth = flash->width;
        info->map.phys = res->start;