From: "Daniel González Cabanelas" <dgcbueu@gmail.com>
To: sre@kernel.org
Cc: linux-pm@vger.kernel.org
Subject: [PATCH] power: reset: linkstation-poweroff: add missing put_device()
Date: Fri, 16 Oct 2020 20:22:37 +0200 [thread overview]
Message-ID: <21115613.dmes8fMApM@tool> (raw)
The of_mdio_find_bus() takes a reference to the underlying device
structure, we should release that reference using a put_device() call.
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
---
drivers/power/reset/linkstation-poweroff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c
index 39e89baed..f1e843df0 100644
--- a/drivers/power/reset/linkstation-poweroff.c
+++ b/drivers/power/reset/linkstation-poweroff.c
@@ -113,6 +113,7 @@ static int __init linkstation_poweroff_init(void)
return -EPROBE_DEFER;
phydev = phy_find_first(bus);
+ put_device(&bus->dev);
if (!phydev)
return -EPROBE_DEFER;
--
2.28.0
reply other threads:[~2020-10-16 18:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=21115613.dmes8fMApM@tool \
--to=dgcbueu@gmail.com \
--cc=linux-pm@vger.kernel.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).