Skip to contentSkip to conversation

mtd: denali_dt: harmless case of testing the wrong variable

PATCH In review Dan Carpenter 2 participants 2 messages Apr 1, 2013 – May 10, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: denali_dt: harmless case of testing the wrong variable

There is a warning message that can't be printed because we test the wrong variable.

drivers/mtd/nand/denali_dt.c +1 -1
index 546f8cb..02988b0 100644
@@ -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;