Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Hongzhou Yang <hongzhou.yang@mediatek.com>,
	Chaotian Jing <chaotian.jing@mediatek.com>,
	Maoguang Meng <maoguang.meng@mediatek.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc
Date: Fri, 13 Mar 2015 21:47:21 +0800	[thread overview]
Message-ID: <1426254441.16768.315.camel@mtksdaap41> (raw)
In-Reply-To: <1426168353.30920.2.camel@phoenix>

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




  parent reply	other threads:[~2015-03-13 13:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yingjoe Chen [this message]
2015-03-18 11:58 ` [PATCH 1/2] pinctrl: mediatek: mtk-common: Remove kfree for memory allocated by devm_kzalloc Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426254441.16768.315.camel@mtksdaap41 \
    --to=yingjoe.chen@mediatek.com \
    --cc=axel.lin@ingics.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=hongzhou.yang@mediatek.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=maoguang.meng@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox