linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: reset: linkstation-poweroff: add missing put_device()
@ 2020-10-16 18:22 Daniel González Cabanelas
  0 siblings, 0 replies; only message in thread
From: Daniel González Cabanelas @ 2020-10-16 18:22 UTC (permalink / raw)
  To: sre; +Cc: linux-pm

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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-16 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 18:22 [PATCH] power: reset: linkstation-poweroff: add missing put_device() Daniel González Cabanelas

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).