]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/nand/au1550nd.c
Merge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
[~andy/linux] / drivers / mtd / nand / au1550nd.c
index ae8dd7c4103922fc760786be079b7576ad648893..2880d888cfc5c260aefcdd5caba743d05a292ae6 100644 (file)
@@ -418,10 +418,8 @@ static int au1550nd_probe(struct platform_device *pdev)
        }
 
        ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
-       if (!ctx) {
-               dev_err(&pdev->dev, "no memory for NAND context\n");
+       if (!ctx)
                return -ENOMEM;
-       }
 
        r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!r) {
@@ -480,6 +478,8 @@ static int au1550nd_probe(struct platform_device *pdev)
 
        mtd_device_register(&ctx->info, pd->parts, pd->num_parts);
 
+       platform_set_drvdata(pdev, ctx);
+
        return 0;
 
 out3: