Commit 01e1429b authored by Arvind Yadav's avatar Arvind Yadav Committed by Chanwoo Choi

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent c7eb47f9
...@@ -301,6 +301,9 @@ static int axp288_extcon_probe(struct platform_device *pdev) ...@@ -301,6 +301,9 @@ static int axp288_extcon_probe(struct platform_device *pdev)
for (i = 0; i < EXTCON_IRQ_END; i++) { for (i = 0; i < EXTCON_IRQ_END; i++) {
pirq = platform_get_irq(pdev, i); pirq = platform_get_irq(pdev, i);
if (pirq < 0)
return pirq;
info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq); info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq);
if (info->irq[i] < 0) { if (info->irq[i] < 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
......
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