From b25b5aa06667b01fee8fe2648d4ea9db32c87d1a Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:26 +0100 Subject: ASoC: 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: Mark Brown Cc: Liam Girdwood Signed-off-by: Greg Kroah-Hartman --- sound/soc/mxs/mxs-saif.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sound/soc/mxs') diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 365d9d27a321..b327709eb192 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -724,11 +724,9 @@ static int mxs_saif_probe(struct platform_device *pdev) iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - saif->base = devm_request_and_ioremap(&pdev->dev, iores); - if (!saif->base) { - dev_err(&pdev->dev, "ioremap failed\n"); - return -ENODEV; - } + saif->base = devm_ioremap_resource(&pdev->dev, iores); + if (IS_ERR(saif->base)) + return PTR_ERR(saif->base); dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!dmares) { -- cgit v1.2.3