From 6c67050ab108bcce2576fa1d7a0557eb0376520a Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 18 Mar 2013 15:11:11 +0530 Subject: mtd: denali_dt: Fix incorrect error check The return value of devm_ioremap_nocache should be checked here instead of res. Signed-off-by: Sachin Kamat Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/nand/denali_dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/nand') diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index 546f8cb5688..02988b00031 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c @@ -42,7 +42,7 @@ static void __iomem *request_and_map(struct device *dev, } ptr = devm_ioremap_nocache(dev, res->start, resource_size(res)); - if (!res) + if (!ptr) dev_err(dev, "ioremap_nocache of %s failed!", res->name); return ptr; -- cgit v1.2.3-18-g5258