summaryrefslogtreecommitdiff
path: root/drivers/extcon/extcon-max8997.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/extcon/extcon-max8997.c')
-rw-r--r--drivers/extcon/extcon-max8997.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 2b1aa04a27dd..23416e443765 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -458,10 +458,6 @@ static int __devinit max8997_muic_probe(struct platform_device *pdev)
"failed: irq request (IRQ: %d,"
" error :%d)\n",
muic_irq->irq, ret);
-
- for (i = i - 1; i >= 0; i--)
- free_irq(muic_irq->irq, info);
-
goto err_irq;
}
}
@@ -499,6 +495,8 @@ static int __devinit max8997_muic_probe(struct platform_device *pdev)
err_extcon:
kfree(info->edev);
err_irq:
+ while (--i >= 0)
+ free_irq(pdata->irq_base + muic_irqs[i].irq, info);
kfree(info);
err_kfree:
return ret;