mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Cc: <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
This commit is contained in:
parent
12adef5b49
commit
369afd4ba2
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue