Skip to content

Commit 2e84dc3

Browse files
Saravana Kannangregkh
authored andcommitted
driver core: Release all resources during unbind before updating device links
This commit fixes a bug in commit 9ed9895 ("driver core: Functional dependencies tracking support") where the device link status was incorrectly updated in the driver unbind path before all the device's resources were released. Fixes: 9ed9895 ("driver core: Functional dependencies tracking support") Cc: stable <[email protected]> Reported-by: Uwe Kleine-König <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Saravana Kannan <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Yang Yingliang <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Mark Brown <[email protected]> Cc: Matti Vaittinen <[email protected]> Cc: James Clark <[email protected]> Acked-by: "Rafael J. Wysocki" <[email protected]> Tested-by: Uwe Kleine-König <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 28f2d57 commit 2e84dc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/dd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,8 @@ static void __device_release_driver(struct device *dev, struct device *parent)
12741274
if (dev->bus && dev->bus->dma_cleanup)
12751275
dev->bus->dma_cleanup(dev);
12761276

1277-
device_links_driver_cleanup(dev);
12781277
device_unbind_cleanup(dev);
1278+
device_links_driver_cleanup(dev);
12791279

12801280
klist_remove(&dev->p->knode_driver);
12811281
device_pm_check_callbacks(dev);

0 commit comments

Comments
 (0)