public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yangtao Li <tiny.windzz@gmail.com>,
	b.zolnierkie@samsung.com, axboe@kernel.dk
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ata: pata_macio: add of_node_put()
Date: Wed, 21 Nov 2018 18:24:43 +0300	[thread overview]
Message-ID: <e45f832b-ef98-e419-6082-27dd7ced71d2@cogentembedded.com> (raw)
In-Reply-To: <20181121130439.22255-1-tiny.windzz@gmail.com>

Hello!

On 11/21/2018 04:04 PM, 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.

   I thought we're inside pata_macio_cable_detect()?

> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
>  drivers/ata/pata_macio.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
> index 9588e685d994..8cc9c429ad95 100644
> --- a/drivers/ata/pata_macio.c
> +++ b/drivers/ata/pata_macio.c
> @@ -483,6 +483,8 @@ static int pata_macio_cable_detect(struct ata_port *ap)
>  		struct device_node *root = of_find_node_by_path("/");
>  		const char *model = of_get_property(root, "model", NULL);
>  
> +		of_node_put(root);
> +
>  		if (cable && !strncmp(cable, "80-", 3)) {
>  			/* Some drives fail to detect 80c cable in PowerBook
>  			 * These machine use proprietary short IDE cable

MBR, Sergei

  reply	other threads:[~2018-11-21 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181121130510epcas3p4498edc67a02f61a6aa8e55efa9349681@epcas3p4.samsung.com>
2018-11-21 13:04 ` [PATCH] ata: pata_macio: add of_node_put() Yangtao Li
2018-11-21 15:24   ` Sergei Shtylyov [this message]
2018-11-21 15:31     ` Frank Lee
2018-11-21 15:33       ` Frank Lee
2018-11-22  8:36         ` Sergei Shtylyov
2018-12-20 17:03   ` Bartlomiej Zolnierkiewicz
2018-12-20 18:01     ` Jens Axboe
2018-12-21  1:09       ` Frank Lee
2018-12-21 14:11         ` Jens Axboe

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=e45f832b-ef98-e419-6082-27dd7ced71d2@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiny.windzz@gmail.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