Message ID | 20250616135357.3929441-3-claudiu.beznea.uj@bp.renesas.com |
---|---|
State | New |
Headers | show |
Series | PM: domains: Detach on device_unbind_cleanup() | expand |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 075ec1d1b73a..2459be6aecf4 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1400,11 +1400,8 @@ static int platform_probe(struct device *_dev) if (ret) goto out; - if (drv->probe) { + if (drv->probe) ret = drv->probe(dev); - if (ret) - dev_pm_domain_detach(_dev, true); - } out: if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { @@ -1422,7 +1419,6 @@ static void platform_remove(struct device *_dev) if (drv->remove) drv->remove(dev); - dev_pm_domain_detach(_dev, true); } static void platform_shutdown(struct device *_dev)