public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Chen <peter.chen@nxp.com>
Cc: linux-input@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Damien Riegel <damien.riegel@savoirfairelinux.com>
Subject: Re: [PATCH 1/1] input: touchscreen: ts4800-ts: add missing of_node_put after calling of_parse_phandle
Date: Fri, 15 Jul 2016 09:32:46 -0700	[thread overview]
Message-ID: <20160715163246.GB27847@dtor-ws> (raw)
In-Reply-To: <1468575125-24920-1-git-send-email-peter.chen@nxp.com>

On Fri, Jul 15, 2016 at 05:32:05PM +0800, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
> 
> Cc: linux-input@vger.kernel.org
> Cc: Rob Herring <robh@kernel.org>
> Cc: Damien Riegel <damien.riegel@savoirfairelinux.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/input/touchscreen/ts4800-ts.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/touchscreen/ts4800-ts.c b/drivers/input/touchscreen/ts4800-ts.c
> index 3c3dd78..8f27ad8 100644
> --- a/drivers/input/touchscreen/ts4800-ts.c
> +++ b/drivers/input/touchscreen/ts4800-ts.c
> @@ -135,6 +135,7 @@ static int ts4800_parse_dt(struct platform_device *pdev,
>  	ts->bit = BIT(bit);
>  
>  	ts->regmap = syscon_node_to_regmap(syscon_np);
> +	of_node_put(syscon_np);

This does not help with the other 2 "returns" above which also leak the
reference count. I'll switch the code around and apply.

>  	if (IS_ERR(ts->regmap)) {
>  		dev_err(dev, "cannot get parent's regmap\n");
>  		return PTR_ERR(ts->regmap);
> -- 
> 1.9.1
> 

Thanks.

-- 
Dmitry

      reply	other threads:[~2016-07-15 16:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  9:32 [PATCH 1/1] input: touchscreen: ts4800-ts: add missing of_node_put after calling of_parse_phandle Peter Chen
2016-07-15 16:32 ` Dmitry Torokhov [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=20160715163246.GB27847@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=damien.riegel@savoirfairelinux.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    --cc=robh@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