[1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc
diff mbox

Message ID 1426168353.30920.2.camel@phoenix
State New
Headers show

Commit Message

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

Comments

Yingjoe Chen March 13, 2015, 1:47 p.m. UTC | #1
On Thu, 2015-03-12 at 21:52 +0800, Axel Lin wrote:
> 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:

Hi Axel,

Thanks for fixing my bugs :)

Acked-by: Yingjoe Chen <yingjoe.chen@mediatek.com>

Joe.C



--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij March 18, 2015, 11:58 a.m. UTC | #2
On Thu, Mar 12, 2015 at 2:52 PM, Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Patch applied with Yingjoe's ACK.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

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: