Commit 369afd4b authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Chanwoo Choi

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: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 12adef5b
...@@ -721,7 +721,7 @@ static int max14577_muic_probe(struct platform_device *pdev) ...@@ -721,7 +721,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
unsigned int virq = 0; unsigned int virq = 0;
virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq); virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq);
if (!virq) if (virq <= 0)
return -EINVAL; return -EINVAL;
muic_irq->virq = virq; muic_irq->virq = virq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment