linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc
@ 2015-03-12 13:52 Axel Lin
  2015-03-12 13:53 ` [PATCH 2/2] pinctrl: mediatek: mtk-common: Use devm_kcalloc at appropriate places Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2015-03-12 13:52 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Matthias Brugger, Hongzhou Yang, Chaotian Jing, Yingjoe Chen,
	Maoguang Meng, linux-gpio@vger.kernel.org

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index b8f8bef..f82f57a 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,
 	if (!irq) {
 		dev_err(&pdev->dev, "couldn't parse and map irq\n");
 		ret = -EINVAL;
-		goto free_edges;
+		goto chip_error;
 	}
 
 	pctl->domain = irq_domain_add_linear(np,
@@ -1230,7 +1230,7 @@ int mtk_pctrl_init(struct platform_device *pdev,
 	if (!pctl->domain) {
 		dev_err(&pdev->dev, "Couldn't register IRQ domain\n");
 		ret = -ENOMEM;
-		goto free_edges;
+		goto chip_error;
 	}
 
 	mtk_eint_init(pctl);
@@ -1248,8 +1248,6 @@ int mtk_pctrl_init(struct platform_device *pdev,
 	set_irq_flags(irq, IRQF_VALID);
 	return 0;
 
-free_edges:
-	kfree(pctl->eint_dual_edges);
 chip_error:
 	gpiochip_remove(pctl->chip);
 pctrl_error:
-- 
1.9.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-18 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 13:52 [PATCH 1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc Axel Lin
2015-03-12 13:53 ` [PATCH 2/2] pinctrl: mediatek: mtk-common: Use devm_kcalloc at appropriate places Axel Lin
2015-03-13 19:47   ` Hongzhou Yang
2015-03-18 12:08   ` Linus Walleij
2015-03-13 13:47 ` [PATCH 1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc Yingjoe Chen
2015-03-18 11:58 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).