mtd: denali_dt: Fix incorrect error check
The return value of devm_ioremap_nocache should be checked here instead of res. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Родитель
837a6ba4f3
Коммит
6c67050ab1
|
@ -42,7 +42,7 @@ static void __iomem *request_and_map(struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = devm_ioremap_nocache(dev, res->start, resource_size(res));
|
ptr = devm_ioremap_nocache(dev, res->start, resource_size(res));
|
||||||
if (!res)
|
if (!ptr)
|
||||||
dev_err(dev, "ioremap_nocache of %s failed!", res->name);
|
dev_err(dev, "ioremap_nocache of %s failed!", res->name);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче