From bc3bad166ca6b9683e7990a028073860954e67fc Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:23 +0100 Subject: video: 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 Cc: Florian Tobias Schandinat Acked-by: Jingoo Han Signed-off-by: Greg Kroah-Hartman --- drivers/video/exynos/exynos_dp_core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/video/exynos') diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index 4ef18e2e90cc..7aae0bf3b372 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -1076,11 +1076,9 @@ static int exynos_dp_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dp->reg_base = devm_request_and_ioremap(&pdev->dev, res); - if (!dp->reg_base) { - dev_err(&pdev->dev, "failed to ioremap\n"); - return -ENOMEM; - } + dp->reg_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(dp->reg_base)) + return PTR_ERR(dp->reg_base); dp->irq = platform_get_irq(pdev, 0); if (dp->irq == -ENXIO) { -- cgit v1.2.1