1
0
Fork 0

extcon: axp288:: Handle return value of platform_get_irq

platform_get_irq() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
hifive-unleashed-5.1
Arvind Yadav 2017-11-23 21:25:30 +05:30 committed by Chanwoo Choi
parent c7eb47f9e4
commit 01e1429b87
1 changed files with 3 additions and 0 deletions

View File

@ -301,6 +301,9 @@ static int axp288_extcon_probe(struct platform_device *pdev)
for (i = 0; i < EXTCON_IRQ_END; i++) {
pirq = platform_get_irq(pdev, i);
if (pirq < 0)
return pirq;
info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq);
if (info->irq[i] < 0) {
dev_err(&pdev->dev,