diff mbox

[spi,7/7] spi-ep93xx: remove duplicate check on resource

Message ID 1413885950-24208-7-git-send-email-varkab@cdac.in (mailing list archive)
State New, archived
Headers show

Commit Message

Varka Bhadram Oct. 21, 2014, 10:05 a.m. UTC
Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
---
 drivers/spi/spi-ep93xx.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index d7bac60..9a4c435 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -1077,20 +1077,14 @@  static int ep93xx_spi_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "unable to get iomem resource\n");
-		error = -ENODEV;
-		goto fail_put_clock;
-	}
-
-	espi->sspdr_phys = res->start + SSPDR;
-
 	espi->regs_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(espi->regs_base)) {
 		error = PTR_ERR(espi->regs_base);
 		goto fail_put_clock;
 	}
 
+	espi->sspdr_phys = res->start + SSPDR;
+
 	error = devm_request_irq(&pdev->dev, irq, ep93xx_spi_interrupt,
 				0, "ep93xx-spi", espi);
 	if (error) {