mtd: denali: fix error handling for devm_ioremap_nocache()
Subsystems (2)
PATCH 1/1 mtd: denali: fix error handling for devm_ioremap_nocache()
Use ptr' rather than res' to check the return value.
Signed-off-by Xi Wang <[email protected]>
--- drivers/mtd/nand/denali_dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/denali_dt.c +1 -1
@@ -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