aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-10-01 20:14:59 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2012-10-23 03:32:13 -0400
commit03019759b98de92b5507c8c2f6e253a35d59c868 (patch)
tree3e5bd7a7793ce222536b93e56c94f5c5191b3fbb /drivers/extcon
parent5cd3c277ebc64e4bc30c5eb6412edd43b5730a4f (diff)
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 <axel.lin@ingics.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-adc-jack.c5
1 files changed, 2 insertions, 3 deletions
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)
161 err = request_any_context_irq(data->irq, adc_jack_irq_thread, 161 err = request_any_context_irq(data->irq, adc_jack_irq_thread,
162 pdata->irq_flags, pdata->name, data); 162 pdata->irq_flags, pdata->name, data);
163 163
164 if (err) { 164 if (err < 0) {
165 dev_err(&pdev->dev, "error: irq %d\n", data->irq); 165 dev_err(&pdev->dev, "error: irq %d\n", data->irq);
166 err = -EINVAL;
167 goto err_irq; 166 goto err_irq;
168 } 167 }
169 168
170 goto out; 169 return 0;
171 170
172err_irq: 171err_irq:
173 extcon_dev_unregister(&data->edev); 172 extcon_dev_unregister(&data->edev);