[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1348978049.7492.0.camel@anish-Inspiron-N5050>
Date: Sun, 30 Sep 2012 09:37:29 +0530
From: anish kumar <anish198519851985@...il.com>
To: Axel Lin <axel.lin@...ics.com>
Cc: linux-kernel@...r.kernel.org,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
anish kumar <anish.singh@...sung.com>
Subject: Re: [PATCH] extcon: adc-jack: Fix checking return value of
request_any_context_irq
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@...ics.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists