[PATCH] mtd: onenand: fix warning (integer used as pointer)

Brian Norris computersforpeace at gmail.com
Tue Dec 17 04:38:10 EST 2013


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 at gmail.com>
---
Compile tested only

 drivers/mtd/onenand/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c
index 63699fffc96d..8e1919b6f074 100644
--- a/drivers/mtd/onenand/generic.c
+++ b/drivers/mtd/onenand/generic.c
@@ -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);
-- 
1.8.3.2




More information about the linux-mtd mailing list