diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-18 05:41:11 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 09:03:53 -0400 |
commit | 6c67050ab108bcce2576fa1d7a0557eb0376520a (patch) | |
tree | da16e73dc12c63f5ebe46413a58bc690c3028618 /drivers/mtd | |
parent | 837a6ba4f3b6d23026674e6af6b6849a4634fff9 (diff) |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/denali_dt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index 546f8cb5688d..02988b00031a 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c | |||
@@ -42,7 +42,7 @@ static void __iomem *request_and_map(struct device *dev, | |||
42 | } | 42 | } |
43 | 43 | ||
44 | ptr = devm_ioremap_nocache(dev, res->start, resource_size(res)); | 44 | ptr = devm_ioremap_nocache(dev, res->start, resource_size(res)); |
45 | if (!res) | 45 | if (!ptr) |
46 | dev_err(dev, "ioremap_nocache of %s failed!", res->name); | 46 | dev_err(dev, "ioremap_nocache of %s failed!", res->name); |
47 | 47 | ||
48 | return ptr; | 48 | return ptr; |