aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index b8f8bef8db1e..f82f57a4c354 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1222,7 +1222,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
1222 if (!irq) { 1222 if (!irq) {
1223 dev_err(&pdev->dev, "couldn't parse and map irq\n"); 1223 dev_err(&pdev->dev, "couldn't parse and map irq\n");
1224 ret = -EINVAL; 1224 ret = -EINVAL;
1225 goto free_edges; 1225 goto chip_error;
1226 } 1226 }
1227 1227
1228 pctl->domain = irq_domain_add_linear(np, 1228 pctl->domain = irq_domain_add_linear(np,
@@ -1230,7 +1230,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
1230 if (!pctl->domain) { 1230 if (!pctl->domain) {
1231 dev_err(&pdev->dev, "Couldn't register IRQ domain\n"); 1231 dev_err(&pdev->dev, "Couldn't register IRQ domain\n");
1232 ret = -ENOMEM; 1232 ret = -ENOMEM;
1233 goto free_edges; 1233 goto chip_error;
1234 } 1234 }
1235 1235
1236 mtk_eint_init(pctl); 1236 mtk_eint_init(pctl);
@@ -1248,8 +1248,6 @@ int mtk_pctrl_init(struct platform_device *pdev,
1248 set_irq_flags(irq, IRQF_VALID); 1248 set_irq_flags(irq, IRQF_VALID);
1249 return 0; 1249 return 0;
1250 1250
1251free_edges:
1252 kfree(pctl->eint_dual_edges);
1253chip_error: 1251chip_error:
1254 gpiochip_remove(pctl->chip); 1252 gpiochip_remove(pctl->chip);
1255pctrl_error: 1253pctrl_error: