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.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
This commit is contained in:
Daniel González Cabanelas 2020-10-16 20:22:37 +02:00 committed by Sebastian Reichel
parent 5c8fe583cc
commit 1027a42c25

View file

@ -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;