All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>, Chris Zhong <zyw@rock-chips.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] regulator: rk808: Fix missing of_node_put
Date: Fri, 12 Sep 2014 15:28:55 -0700	[thread overview]
Message-ID: <CAD=FV=WOUPcsQ76MG1poDAK=UQeg3uxN_Ci_akH=4JVqNvUx9w@mail.gmail.com> (raw)
In-Reply-To: <1410430968.32479.2.camel@phoenix>

Axel,

On Thu, Sep 11, 2014 at 3:22 AM, Axel Lin <axel.lin@ingics.com> wrote:
> 1. Pass &pdev->dev rather than &client->dev to of_regulator_match, the *dev
>    argument is used for devres to ensure devm_of_regulator_put_matches() will
>    be called when unload the module.
>
> 2. of_get_child_by_name() returns a node pointer with refcount incremented.
>    Thus add missing of_node_put(reg_np).
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/regulator/rk808-regulator.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

I've tested that things still work fine after applying this patch and
confirmed both of your statements are true to the best of my
knowledge.  I haven't tested module removal (which is where some of
this matters) but what's here looks good.

Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>

-Doug

  reply	other threads:[~2014-09-12 22:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 10:21 [PATCH 1/2] regulator: rk808: Remove unused variables Axel Lin
2014-09-11 10:22 ` [PATCH 2/2] regulator: rk808: Fix missing of_node_put Axel Lin
2014-09-12 22:28   ` Doug Anderson [this message]
2014-09-12 13:53 ` [PATCH 1/2] regulator: rk808: Remove unused variables Mark Brown
2014-09-12 22:20 ` Doug Anderson

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='CAD=FV=WOUPcsQ76MG1poDAK=UQeg3uxN_Ci_akH=4JVqNvUx9w@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zyw@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.