Use devm_ioremap_resource() which provides its own error messages.

Signed-off-by: Jonas Gorski <[email protected]>
---
 drivers/spi/spi-bcm63xx.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 2d64db4..973099b 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -412,18 +412,9 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, master);
        bs->pdev = pdev;
 
-       if (!devm_request_mem_region(&pdev->dev, r->start,
-                                       resource_size(r), PFX)) {
-               dev_err(dev, "iomem request failed\n");
-               ret = -ENXIO;
-               goto out_err;
-       }
-
-       bs->regs = devm_ioremap_nocache(&pdev->dev, r->start,
-                                                       resource_size(r));
-       if (!bs->regs) {
-               dev_err(dev, "unable to ioremap regs\n");
-               ret = -ENOMEM;
+       bs->regs = devm_ioremap_resource(&pdev->dev, r);
+       if (IS_ERR(bs->regs)) {
+               ret = PTR_ERR(bs->regs);
                goto out_err;
        }
 
-- 
1.7.10.4


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to