diff options
author | Saravana Kannan <[email protected]> | 2023-10-17 18:38:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-10-21 23:17:52 +0200 |
commit | 2e84dc37920012b458e9458b19fc4ed33f81bc74 (patch) | |
tree | 736aaac6e00922f84dd039c7ba4e1a82b32d8ab4 | |
parent | 28f2d57d88a71353eb1f1952d1ac4a7816612087 (diff) |
driver core: Release all resources during unbind before updating device links
This commit fixes a bug in commit 9ed9895370ae ("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: 9ed9895370ae ("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]>
-rw-r--r-- | drivers/base/dd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index a528cec24264..0c3725c3eefa 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -1274,8 +1274,8 @@ static void __device_release_driver(struct device *dev, struct device *parent) if (dev->bus && dev->bus->dma_cleanup) dev->bus->dma_cleanup(dev); - device_links_driver_cleanup(dev); device_unbind_cleanup(dev); + device_links_driver_cleanup(dev); klist_remove(&dev->p->knode_driver); device_pm_check_callbacks(dev); |