From 03019759b98de92b5507c8c2f6e253a35d59c868 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 2 Oct 2012 09:14:59 +0900 Subject: extcon: adc-jack: Fix checking return value of request_any_context_irq 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 Signed-off-by: Chanwoo Choi --- drivers/extcon/extcon-adc-jack.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/extcon/extcon-adc-jack.c') diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 725eb5aa8d8c..2cc6bec9f625 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); -- cgit v1.2.3