From: Daniel González Cabanelas Date: Fri, 16 Oct 2020 18:22:37 +0000 (+0200) Subject: power: reset: linkstation-poweroff: add missing put_device() X-Git-Tag: v5.15~1711^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1027a42c25cbf8cfc4ade6503c5110aae04866af;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c index 39e89ba..f1e843d 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;