mtd: do not use plain 0 as NULL
[cascardo/linux.git] / drivers / mtd / onenand / samsung.c
index fa1ee43..8e4b3f2 100644 (file)
@@ -923,7 +923,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
                r = platform_get_resource(pdev, IORESOURCE_MEM, 1);
                if (!r) {
                        dev_err(&pdev->dev, "no buffer memory resource defined\n");
-                       return -ENOENT;
+                       err = -ENOENT;
                        goto ahb_resource_failed;
                }
 
@@ -964,7 +964,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
                r = platform_get_resource(pdev, IORESOURCE_MEM, 1);
                if (!r) {
                        dev_err(&pdev->dev, "no dma memory resource defined\n");
-                       return -ENOENT;
+                       err = -ENOENT;
                        goto dma_resource_failed;
                }
 
@@ -1014,7 +1014,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
        if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
                dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n");
 
-       err = mtd_device_parse_register(mtd, NULL, 0,
+       err = mtd_device_parse_register(mtd, NULL, NULL,
                                        pdata ? pdata->parts : NULL,
                                        pdata ? pdata->nr_parts : 0);