linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Sebastian Reichel <sre@kernel.org>,
	ldv-project@linuxtesting.org, sil2review@lists.osadl.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [SIL2review] [PATCH] power: reset: zx-reboot: put device node in zx_reboot_probe()
Date: Sun, 3 Jun 2018 09:03:08 +0000	[thread overview]
Message-ID: <20180603090308.GA1287@osadl.at> (raw)
In-Reply-To: <1527978125-29850-1-git-send-email-khoroshilov@ispras.ru>

On Sun, Jun 03, 2018 at 01:22:05AM +0300, Alexey Khoroshilov wrote:
> zx_reboot_probe() increments refcnt of zx296702-pcu device node by
> of_find_compatible_node() and leaves it undecremented on both
> successful and error paths.
>

Just wonder - if it warns on the failed case it probably should also
note if it failed in of_find_compatible_node() or not to allow
diagnosing the problem (the compatible_node score was 0) ? 

> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Nicholas Mc Guire <der.herr@hofr.at>

> ---
>  drivers/power/reset/zx-reboot.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c
> index c03e96e6a041..186901c96c01 100644
> --- a/drivers/power/reset/zx-reboot.c
> +++ b/drivers/power/reset/zx-reboot.c
> @@ -51,6 +51,7 @@ static int zx_reboot_probe(struct platform_device *pdev)
>  
>  	np = of_find_compatible_node(NULL, NULL, "zte,zx296702-pcu");
>  	pcu_base = of_iomap(np, 0);
> +	of_node_put(np);
>  	if (!pcu_base) {
>  		iounmap(base);
>  		WARN(1, "failed to map pcu_base address");
> -- 
> 2.7.4
> 
> _______________________________________________
> SIL2review mailing list
> SIL2review@lists.osadl.org
> https://lists.osadl.org/mailman/listinfo/sil2review

  reply	other threads:[~2018-06-03  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-02 22:22 [PATCH] power: reset: zx-reboot: put device node in zx_reboot_probe() Alexey Khoroshilov
2018-06-03  9:03 ` Nicholas Mc Guire [this message]
2018-07-06 11:33 ` Sebastian Reichel

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=20180603090308.GA1287@osadl.at \
    --to=der.herr@hofr.at \
    --cc=julia.lawall@lip6.fr \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sil2review@lists.osadl.org \
    --cc=sre@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;
as well as URLs for NNTP newsgroup(s).