Netdev List
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yangtao Li <tiny.windzz@gmail.com>,
	davem@davemloft.net, yuehaibing@huawei.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: amd: add of_node_put()
Date: Thu, 22 Nov 2018 11:28:21 +0300	[thread overview]
Message-ID: <9ec3ef0c-b931-6a1e-e1ed-5538c42df830@cogentembedded.com> (raw)
In-Reply-To: <20181121125824.22168-1-tiny.windzz@gmail.com>

Hello!

On 21.11.2018 15:58, Yangtao Li wrote:

> of_find_node_by_path() acquires a reference to the node
> returned by it and that reference needs to be dropped by its caller.
> bl_idle_init() doesn't do that, so fix it.

    Again, maybe sparc_lance_probe_one() doesn't do that?

> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
>   drivers/net/ethernet/amd/sunlance.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
> index b4fc0ed5bce8..9d4899826823 100644
> --- a/drivers/net/ethernet/amd/sunlance.c
> +++ b/drivers/net/ethernet/amd/sunlance.c
> @@ -1419,7 +1419,7 @@ static int sparc_lance_probe_one(struct platform_device *op,
>   
>   			prop = of_get_property(nd, "tpe-link-test?", NULL);
>   			if (!prop)
> -				goto no_link_test;
> +				goto node_put;
>   
>   			if (strcmp(prop, "true")) {
>   				printk(KERN_NOTICE "SunLance: warning: overriding option "
> @@ -1428,6 +1428,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
>   				       "to ecd@skynet.be\n");
>   				auxio_set_lte(AUXIO_LTE_ON);
>   			}
> +node_put:
> +			of_node_put(nd);
>   no_link_test:
>   			lp->auto_select = 1;
>   			lp->tpe = 0;

MBR, Sergei

      reply	other threads:[~2018-11-22  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 12:58 [PATCH] net: amd: add of_node_put() Yangtao Li
2018-11-22  8:28 ` Sergei Shtylyov [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=9ec3ef0c-b931-6a1e-e1ed-5538c42df830@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tiny.windzz@gmail.com \
    --cc=yuehaibing@huawei.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