mtd: onenand: fix warning (integer used as pointer)
authorBrian Norris <computersforpeace@gmail.com>
Fri, 20 Sep 2013 19:44:26 +0000 (12:44 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 7 Jan 2014 18:07:35 +0000 (10:07 -0800)
Fixes this sparse warning:

    CHECK   drivers/mtd/onenand/generic.c
  drivers/mtd/onenand/generic.c:61:62: warning: Using plain integer as NULL pointer

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/onenand/generic.c

index 63699fffc96de24b3098f629ea495184103386c8..8e1919b6f07449f007c0b1766f4ffcde5db4c0f1 100644 (file)
@@ -58,7 +58,7 @@ static int generic_onenand_probe(struct platform_device *pdev)
                goto out_release_mem_region;
        }
 
-       info->onenand.mmcontrol = pdata ? pdata->mmcontrol : 0;
+       info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL;
        info->onenand.irq = platform_get_irq(pdev, 0);
 
        info->mtd.name = dev_name(&pdev->dev);