Skip to contentSkip to conversation

mtd: denali: fix error handling for devm_ioremap_nocache()

PATCH Superseded Xi Wang 1 participant 1 message Mar 22, 2013

Subsystems (2)
lore
Share & tools
lore

Xi Wang

author
#0 lore raw

PATCH 1/1 mtd: denali: fix error handling for devm_ioremap_nocache()

Use ptr' rather than res' to check the return value.

---
 drivers/mtd/nand/denali_dt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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;
Signature · 1 line
1.7.10.4