mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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>
This commit is contained in:
parent
5cd3c277eb
commit
03019759b9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user