Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c67050a authored by Sachin Kamat's avatar Sachin Kamat Committed by David Woodhouse
Browse files

mtd: denali_dt: Fix incorrect error check



The return value of devm_ioremap_nocache should be checked here instead
of res.

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 837a6ba4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;