mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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:
parent
837a6ba4f3
commit
6c67050ab1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue