From 8cbce1e5f00ec68ee1c99f57db98c892db227629 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:17 +0100 Subject: rtc: 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 Acked-by: Viresh Kumar Cc: Alessandro Zummo Signed-off-by: Greg Kroah-Hartman --- drivers/rtc/rtc-spear.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/rtc/rtc-spear.c') diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index c2121b5a01f2..a18c3192ed40 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -385,11 +385,9 @@ static int spear_rtc_probe(struct platform_device *pdev) return status; } - config->ioaddr = devm_request_and_ioremap(&pdev->dev, res); - if (!config->ioaddr) { - dev_err(&pdev->dev, "request-ioremap fail\n"); - return -ENOMEM; - } + config->ioaddr = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(config->ioaddr)) + return PTR_ERR(config->ioaddr); config->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(config->clk)) -- cgit v1.2.3