From eb612fa013ca07b954300fa46b1499248cedf926 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:21 +0100 Subject: serial: 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: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sccnxp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 418b495e323..e869eab180b 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -15,6 +15,7 @@ #define SUPPORT_SYSRQ #endif +#include #include #include #include @@ -875,10 +876,9 @@ static int sccnxp_probe(struct platform_device *pdev) goto err_out; } - membase = devm_request_and_ioremap(&pdev->dev, res); - if (!membase) { - dev_err(&pdev->dev, "Failed to ioremap\n"); - ret = -EIO; + membase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(membase)) { + ret = PTR_ERR(membase); goto err_out; } -- cgit v1.2.3-70-g09d2