diff mbox

[v2,2/3] gpio: davinci: Handle the return value of davinci_gpio_irq_setup function

Message ID 1500543738-9696-3-git-send-email-j-keerthy@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

J, KEERTHY July 20, 2017, 9:42 a.m. UTC
Currently davinci_gpio_irq_setup return value is ignored. Handle the
return value appropriately.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/gpio/gpio-davinci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

J, KEERTHY Aug. 2, 2017, 10:59 a.m. UTC | #1
On Thursday 20 July 2017 03:12 PM, Keerthy wrote:
> Currently davinci_gpio_irq_setup return value is ignored. Handle the
> return value appropriately.

Linus,

Any comments on this? Sorry if i pinged too soon. The rest 2 of this
series were pulled by you. So just wanted to check on this one if you
had specific comments.

Regards,
Keerthy

> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>  drivers/gpio/gpio-davinci.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 27499ec..d6fb1ce 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -237,7 +237,10 @@ static int davinci_gpio_probe(struct platform_device *pdev)
>  		goto err;
>  
>  	platform_set_drvdata(pdev, chips);
> -	davinci_gpio_irq_setup(pdev);
> +	ret = davinci_gpio_irq_setup(pdev);
> +	if (ret)
> +		goto err;
> +
>  	return 0;
>  
>  err:
>
Linus Walleij Aug. 7, 2017, 12:12 p.m. UTC | #2
On Wed, Aug 2, 2017 at 12:59 PM, Keerthy <j-keerthy@ti.com> wrote:
> On Thursday 20 July 2017 03:12 PM, Keerthy wrote:
>> Currently davinci_gpio_irq_setup return value is ignored. Handle the
>> return value appropriately.
>
> Linus,
>
> Any comments on this? Sorry if i pinged too soon. The rest 2 of this
> series were pulled by you. So just wanted to check on this one if you
> had specific comments.

I got the impression you would send this in a series with a new
patch requested by Johan.

Do we have consensus that this patch should be applied as-is?

Yours,
Linus Walleij
J, KEERTHY Aug. 7, 2017, 12:38 p.m. UTC | #3
On Monday 07 August 2017 05:42 PM, Linus Walleij wrote:
> On Wed, Aug 2, 2017 at 12:59 PM, Keerthy <j-keerthy@ti.com> wrote:
>> On Thursday 20 July 2017 03:12 PM, Keerthy wrote:
>>> Currently davinci_gpio_irq_setup return value is ignored. Handle the
>>> return value appropriately.
>>
>> Linus,
>>
>> Any comments on this? Sorry if i pinged too soon. The rest 2 of this
>> series were pulled by you. So just wanted to check on this one if you
>> had specific comments.
> 
> I got the impression you would send this in a series with a new
> patch requested by Johan.
> 
> Do we have consensus that this patch should be applied as-is?

IIUC a separate patch is needed to implement remove function. This can
still be independent of that.

https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1450395.html

> 
> Yours,
> Linus Walleij
>
Linus Walleij Aug. 7, 2017, 1:33 p.m. UTC | #4
On Thu, Jul 20, 2017 at 11:42 AM, Keerthy <j-keerthy@ti.com> wrote:

> Currently davinci_gpio_irq_setup return value is ignored. Handle the
> return value appropriately.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Patch applied.

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 27499ec..d6fb1ce 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -237,7 +237,10 @@  static int davinci_gpio_probe(struct platform_device *pdev)
 		goto err;
 
 	platform_set_drvdata(pdev, chips);
-	davinci_gpio_irq_setup(pdev);
+	ret = davinci_gpio_irq_setup(pdev);
+	if (ret)
+		goto err;
+
 	return 0;
 
 err: