linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH spi 1/7] spi-tegra20-slink: remove duplicate check on resource
@ 2014-10-21 10:05 Varka Bhadram
       [not found] ` <1413885950-24208-1-git-send-email-varkab-If5XQcfNmg0@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Varka Bhadram @ 2014-10-21 10:05 UTC (permalink / raw)
  To: linux-spi-u79uwXL29TY76Z2rM5mHXA; +Cc: Varka Bhadram

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab-If5XQcfNmg0@public.gmane.org>
---
 drivers/spi/spi-tegra20-slink.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index a829563..59a85cc 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1154,18 +1154,14 @@ static int tegra_slink_probe(struct platform_device *pdev)
 	spin_lock_init(&tspi->lock);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "No IO memory resource\n");
-		ret = -ENODEV;
-		goto exit_free_master;
-	}
-	tspi->phys = r->start;
 	tspi->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(tspi->base)) {
 		ret = PTR_ERR(tspi->base);
 		goto exit_free_master;
 	}
 
+	tspi->phys = r->start;
+
 	spi_irq = platform_get_irq(pdev, 0);
 	tspi->irq = spi_irq;
 	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-25 17:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 10:05 [PATCH spi 1/7] spi-tegra20-slink: remove duplicate check on resource Varka Bhadram
     [not found] ` <1413885950-24208-1-git-send-email-varkab-If5XQcfNmg0@public.gmane.org>
2014-10-21 10:05   ` [PATCH spi 2/7] spi-tegra20-sflash: " Varka Bhadram
2014-10-21 10:05   ` [PATCH spi 3/7] spi-sirf: " Varka Bhadram
2014-10-21 10:05   ` [PATCH spi 4/7] spi-s3c64xx: " Varka Bhadram
2014-10-21 10:05   ` [PATCH spi 5/7] spi-omap2-mcspi: " Varka Bhadram
2014-10-21 10:05   ` [PATCH spi 6/7] spi-mxs: " Varka Bhadram
2014-10-21 10:05   ` [PATCH spi 7/7] spi-ep93xx: " Varka Bhadram
2014-10-28  4:59   ` [PATCH spi 1/7] spi-tegra20-slink: " Varka Bhadram
     [not found]     ` <544F22C8.8040106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-25 14:08       ` Mark Brown
     [not found]         ` <20150525140806.GX21391-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-05-25 14:43           ` Varka Bhadram
     [not found]             ` <55633524.2060704-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-25 17:33               ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).