[spi,1/7] spi-tegra20-slink: remove duplicate check on resource
diff mbox

Message ID 1413885950-24208-1-git-send-email-varkab@cdac.in
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-tegra20-slink.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Varka Bhadram Oct. 28, 2014, 4:59 a.m. UTC | #1
On 10/21/2014 03:35 PM, Varka Bhadram wrote:
> Sanity check on resource happening with devm_ioremap_resource().
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> ---
>   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,

Ping...
Mark Brown May 25, 2015, 2:08 p.m. UTC | #2
On Tue, Oct 28, 2014 at 10:29:52AM +0530, Varka Bhadram wrote:
> On 10/21/2014 03:35 PM, Varka Bhadram wrote:
> >Sanity check on resource happening with devm_ioremap_resource().

> >+
> >  	spi_irq = platform_get_irq(pdev, 0);
> >  	tspi->irq = spi_irq;
> >  	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,

> Ping...

Please don't send content free pings, and always send patches to
maintainers as covered in SubmittingPatches.
Varka Bhadram May 25, 2015, 2:43 p.m. UTC | #3
On Monday 25 May 2015 07:38 PM, Mark Brown wrote:

> On Tue, Oct 28, 2014 at 10:29:52AM +0530, Varka Bhadram wrote:
>> On 10/21/2014 03:35 PM, Varka Bhadram wrote:
>>> Sanity check on resource happening with devm_ioremap_resource().
>>> +
>>>   	spi_irq = platform_get_irq(pdev, 0);
>>>   	tspi->irq = spi_irq;
>>>   	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
>> Ping...
> Please don't send content free pings, and always send patches to
> maintainers as covered in SubmittingPatches.

Sorry for the mess. I send this series long back on 10/21/2014.

Do you think that should i do something for this series..?
Mark Brown May 25, 2015, 5:33 p.m. UTC | #4
On Mon, May 25, 2015 at 08:13:48PM +0530, Varka Bhadram wrote:
> On Monday 25 May 2015 07:38 PM, Mark Brown wrote:

> >Please don't send content free pings, and always send patches to
> >maintainers as covered in SubmittingPatches.

> Sorry for the mess. I send this series long back on 10/21/2014.

> Do you think that should i do something for this series..?

You should send me a copy to review if you think it's still useful.

Patch
diff mbox

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,