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-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1027a42c25cbf8cfc4ade6503c5110aae04866af;p=linux.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 39e89baedb5f9..f1e843df0e161 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;