diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-07-04 06:04:15 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-07-08 09:01:59 -0400 |
commit | f8c63918c9a3004bd052fa4af08aa1cefbcd79ac (patch) | |
tree | eb35ec3a6e1142b7249b12ee8f34599b422c0968 /drivers/power/gpio-charger.c | |
parent | 086ef502c202503a19a491838098157cdab6238e (diff) |
gpio-charger: Fix checking return value of request_any_context_irq
request_any_context_irq() returns a negative value on failure.
On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/gpio-charger.c')
-rw-r--r-- | drivers/power/gpio-charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c index 718f2c537827..a64b8854cfd5 100644 --- a/drivers/power/gpio-charger.c +++ b/drivers/power/gpio-charger.c | |||
@@ -127,7 +127,7 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev) | |||
127 | ret = request_any_context_irq(irq, gpio_charger_irq, | 127 | ret = request_any_context_irq(irq, gpio_charger_irq, |
128 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 128 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
129 | dev_name(&pdev->dev), charger); | 129 | dev_name(&pdev->dev), charger); |
130 | if (ret) | 130 | if (ret < 0) |
131 | dev_warn(&pdev->dev, "Failed to request irq: %d\n", ret); | 131 | dev_warn(&pdev->dev, "Failed to request irq: %d\n", ret); |
132 | else | 132 | else |
133 | gpio_charger->irq = irq; | 133 | gpio_charger->irq = irq; |