linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq
@ 2012-09-27 23:36 Axel Lin
  2012-09-30  4:07 ` anish kumar
  2012-10-02  0:28 ` Chanwoo Choi
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-09-27 23:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: MyungJoo Ham, Chanwoo Choi, anish kumar

On failure, request_any_context_irq() returns a negative value.
On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.

Also ensure adc_jack_probe() return 0 on success.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/extcon/extcon-adc-jack.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index 725eb5a..2cc6bec 100644
--- a/drivers/extcon/extcon-adc-jack.c
+++ b/drivers/extcon/extcon-adc-jack.c
@@ -161,13 +161,12 @@ static int __devinit adc_jack_probe(struct platform_device *pdev)
 	err = request_any_context_irq(data->irq, adc_jack_irq_thread,
 			pdata->irq_flags, pdata->name, data);
 
-	if (err) {
+	if (err < 0) {
 		dev_err(&pdev->dev, "error: irq %d\n", data->irq);
-		err = -EINVAL;
 		goto err_irq;
 	}
 
-	goto out;
+	return 0;
 
 err_irq:
 	extcon_dev_unregister(&data->edev);
-- 
1.7.9.5




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

* Re: [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq
  2012-09-27 23:36 [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq Axel Lin
@ 2012-09-30  4:07 ` anish kumar
  2012-10-02  0:28 ` Chanwoo Choi
  1 sibling, 0 replies; 3+ messages in thread
From: anish kumar @ 2012-09-30  4:07 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, MyungJoo Ham, Chanwoo Choi, anish kumar

On Fri, 2012-09-28 at 07:36 +0800, Axel Lin wrote:
> On failure, request_any_context_irq() returns a negative value.
> On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
> 
> Also ensure adc_jack_probe() return 0 on success.
this patch makes sense.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/extcon/extcon-adc-jack.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
> index 725eb5a..2cc6bec 100644
> --- a/drivers/extcon/extcon-adc-jack.c
> +++ b/drivers/extcon/extcon-adc-jack.c
> @@ -161,13 +161,12 @@ static int __devinit adc_jack_probe(struct platform_device *pdev)
>  	err = request_any_context_irq(data->irq, adc_jack_irq_thread,
>  			pdata->irq_flags, pdata->name, data);
>  
> -	if (err) {
> +	if (err < 0) {
>  		dev_err(&pdev->dev, "error: irq %d\n", data->irq);
> -		err = -EINVAL;
>  		goto err_irq;
>  	}
>  
> -	goto out;
> +	return 0;
>  
>  err_irq:
>  	extcon_dev_unregister(&data->edev);



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

* Re: [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq
  2012-09-27 23:36 [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq Axel Lin
  2012-09-30  4:07 ` anish kumar
@ 2012-10-02  0:28 ` Chanwoo Choi
  1 sibling, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2012-10-02  0:28 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, MyungJoo Ham, anish kumar, Greg KH

On 09/28/2012 08:36 AM, Axel Lin wrote:

> On failure, request_any_context_irq() returns a negative value.
> On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
> 
> Also ensure adc_jack_probe() return 0 on success.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---

Applied, thanks.

I applied two patch from Axel Lin at extcon git-tree and
you can check it after some hours.
-
http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next

Thank you,
Chanwoo Choi

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

end of thread, other threads:[~2012-10-02  0:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 23:36 [PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq Axel Lin
2012-09-30  4:07 ` anish kumar
2012-10-02  0:28 ` Chanwoo Choi

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).