SUPERH platform development
 help / color / mirror / Atom feed
From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2] shmobile: ipmmu: Add basic PMB support
Date: Fri, 08 Feb 2013 02:25:20 +0000	[thread overview]
Message-ID: <51146210.5020901@igel.co.jp> (raw)
In-Reply-To: <1360228959-14911-1-git-send-email-dhobsong@igel.co.jp>

Morimoto-san,

On 2013/02/08 10:59, Kuninori Morimoto wrote:
>
> Hi Damian
>
> one comment from me
>
>> +void *ipmmu_pmb_init(struct shmobile_ipmmu *ipmmu)
>> +{
>> +	int err = -ENOENT;
>> +	int i;
>> +	struct ipmmu_pmb_priv *priv;
>> +
>> +	priv = devm_kzalloc(ipmmu->dev, sizeof(struct ipmmu_pmb_priv),
>> +								GFP_KERNEL);
>> +	if (!priv) {
>> +		dev_err(ipmmu->dev, "cannot allocate device data\n");
>> +		return ERR_PTR(-ENOMEM);
>> +	}
> (snip)
>> +destroy_device:
>> +	device_destroy(priv->pmb_class, priv->pmb_dev);
>> +unregister_region:
>> +	unregister_chrdev_region(priv->pmb_dev, 1);
>> +destroy_class:
>> +	class_destroy(priv->pmb_class);
>> +free_priv:
>> +	kfree(priv);
>> +	return ERR_PTR(err);
>> +}
>
> you are using devm_kzalloc() for priv.
> This means kfree(priv) is not needed here.
Oops.  Thank you.  I removed the kfree from the deinit, but forgot about 
it here.

Damian
>
> Best regards
> ---
> Kuninori Morimoto
>


-- 
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp

      parent reply	other threads:[~2013-02-08  2:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  9:22 [PATCH v2] shmobile: ipmmu: Add basic PMB support Damian Hobson-Garcia
2013-02-08  1:59 ` Kuninori Morimoto
2013-02-08  2:25 ` Damian Hobson-Garcia [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=51146210.5020901@igel.co.jp \
    --to=dhobsong@igel.co.jp \
    --cc=linux-sh@vger.kernel.org \
    /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