提交 6c67050a 编写于 作者: S Sachin Kamat 提交者: David Woodhouse

mtd: denali_dt: Fix incorrect error check

The return value of devm_ioremap_nocache should be checked here instead
of res.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 837a6ba4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册