power: reset: linkstation-poweroff: add missing put_device()
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Fri, 16 Oct 2020 18:22:37 +0000 (20:22 +0200)
committerSebastian Reichel <sre@kernel.org>
Tue, 29 Dec 2020 14:59:49 +0000 (15:59 +0100)
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>
drivers/power/reset/linkstation-poweroff.c

index 39e89ba..f1e843d 100644 (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;