public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <tiny.windzz@gmail.com>
To: b.zolnierkie@samsung.com, axboe@kernel.dk
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH] ata: pata_macio: add of_node_put()
Date: Wed, 21 Nov 2018 08:04:39 -0500	[thread overview]
Message-ID: <20181121130439.22255-1-tiny.windzz@gmail.com> (raw)

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.

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
-- 
2.17.0


             reply	other threads:[~2018-11-21 13:04 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 ` Yangtao Li [this message]
2018-11-21 15:24   ` [PATCH] ata: pata_macio: add of_node_put() Sergei Shtylyov
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=20181121130439.22255-1-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.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