Skip to contentSkip to conversation

power: reset: linkstation-poweroff: add missing put_device()

PATCH New Daniel González Cabanelas 1 participant 1 message Oct 16, 2020 System reset/shutdown drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: reset: linkstation-poweroff: add missing put_device()

The of_mdio_find_bus() takes a reference to the underlying device structure, we should release that reference using a put_device() call.

---
 drivers/power/reset/linkstation-poweroff.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/reset/linkstation-poweroff.c +1 -0
index 39e89baed..f1e843df0 100644
@@ -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;
 
Signature · 1 line
2.28.0