diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-04-18 10:47:30 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2014-04-24 04:26:31 -0400 |
commit | 369afd4ba22f5b8de0c9229b6e62b3f9e2207034 (patch) | |
tree | 3ca0176a759326d5b204231d97cb51af435d0ae5 /drivers/extcon | |
parent | 12adef5b49e98eb181b4163c36e2998169e1379b (diff) |
extcon: max14577: Properly handle regmap_irq_get_virq error
The regmap_irq_get_virq may return 0 or -EINVAL on error. Fail the probe
in both situations.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index 4179ce1a23de..2acf7461c905 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c | |||
@@ -721,7 +721,7 @@ static int max14577_muic_probe(struct platform_device *pdev) | |||
721 | unsigned int virq = 0; | 721 | unsigned int virq = 0; |
722 | 722 | ||
723 | virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq); | 723 | virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq); |
724 | if (!virq) | 724 | if (virq <= 0) |
725 | return -EINVAL; | 725 | return -EINVAL; |
726 | muic_irq->virq = virq; | 726 | muic_irq->virq = virq; |
727 | 727 | ||