public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Myungjoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH 2/2] mfd: max77693: fix irq leak and wrong kfree call
Date: Fri, 29 Jun 2012 18:26:01 +0200	[thread overview]
Message-ID: <20120629162601.GT22806@sortiz-mobl> (raw)
In-Reply-To: <1339115737.4310.7.camel@phoenix>

Hi Axel,

On Fri, Jun 08, 2012 at 08:35:37AM +0800, Axel Lin wrote:
> We need to call max77693_irq_exit() in max77693_i2c_probe error patch and
> max77693_i2c_remove.
> 
> Current code already uses devm_kzalloc() to allocate memory for max77693.
> Thus we should not call kfree(max77693), otherwise we got double free.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/mfd/max77693.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
> index 4055bc2..4251757 100644
> --- a/drivers/mfd/max77693.c
> +++ b/drivers/mfd/max77693.c
> @@ -122,7 +122,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c,
>  	max77693->regmap = devm_regmap_init_i2c(i2c, &max77693_regmap_config);
>  	if (IS_ERR(max77693->regmap)) {
>  		ret = PTR_ERR(max77693->regmap);
> -		dev_err(max77693->dev,"failed to allocate register map: %d\n",
> +		dev_err(max77693->dev, "failed to allocate register map: %d\n",
>  				ret);
>  		goto err_regmap;
>  	}
This is an unrelated change. I applied this patch except for this chunk.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      reply	other threads:[~2012-06-29 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08  0:34 [PATCH RESEND 1/2] mfd: max77693: Remove unused iolock mutex Axel Lin
2012-06-08  0:35 ` [PATCH 2/2] mfd: max77693: fix irq leak and wrong kfree call Axel Lin
2012-06-29 16:26   ` Samuel Ortiz [this message]

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=20120629162601.GT22806@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=axel.lin@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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