提交 369afd4b 编写于 作者: K Krzysztof Kozlowski 提交者: 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: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
上级 12adef5b
......@@ -721,7 +721,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
unsigned int virq = 0;
virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq);
if (!virq)
if (virq <= 0)
return -EINVAL;
muic_irq->virq = virq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册