From 6c2db1c682a9668b854f9f4025650f7145bd090f Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:09 +0100 Subject: [PATCH] mfd: 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: Samuel Ortiz Signed-off-by: Greg Kroah-Hartman --- drivers/mfd/intel_msic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c index ab8d0b2739b2..1804331bd52c 100644 --- a/drivers/mfd/intel_msic.c +++ b/drivers/mfd/intel_msic.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -424,11 +425,9 @@ static int intel_msic_probe(struct platform_device *pdev) return -ENODEV; } - msic->irq_base = devm_request_and_ioremap(&pdev->dev, res); - if (!msic->irq_base) { - dev_err(&pdev->dev, "failed to map SRAM memory\n"); - return -ENOMEM; - } + msic->irq_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(msic->irq_base)) + return PTR_ERR(msic->irq_base); platform_set_drvdata(pdev, msic); -- 2.34.1