[patch] mtd: denali_dt: harmless case of testing the wrong variable
Dan Carpenter
dan.carpenter at oracle.com
Mon Apr 1 02:21:51 EDT 2013
There is a warning message that can't be printed because we test the
wrong variable.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 546f8cb..02988b0 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;
More information about the linux-mtd
mailing list