aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos-gsc
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 06:09:07 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-06 09:33:04 -0200
commitf23999eccb5f1b6ec858279670307b5b1abe887a (patch)
treecaf2bd0a716fbb3cfd3af1ea13b5efbf39a5886b /drivers/media/platform/exynos-gsc
parent7b34be71db533f3e0cf93d53cf62d036cdb5418a (diff)
[media] media: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos-gsc')
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 99b841d2f8f..82d9f6ac12f 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1099,11 +1099,9 @@ static int gsc_probe(struct platform_device *pdev)
gsc->clock = ERR_PTR(-EINVAL);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gsc->regs = devm_request_and_ioremap(dev, res);
- if (!gsc->regs) {
- dev_err(dev, "failed to map registers\n");
- return -ENOENT;
- }
+ gsc->regs = devm_ioremap_resource(dev, res);
+ if (IS_ERR(gsc->regs))
+ return PTR_ERR(gsc->regs);
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {