FROMLIST: PM / sleep: don't suspend parent when async child suspend_{noirq,late}...
[firefly-linux-kernel-4.4.55.git] / drivers / base / power / main.c
index d388edadfb6ad6fcdce33ea5d615c40528c33846..982f586e9290b5acd65c713b9a5742e785bfd863 100644 (file)
@@ -1038,6 +1038,9 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a
 
        dpm_wait_for_children(dev, async);
 
+       if (async_error)
+               goto Complete;
+
        if (dev->pm_domain) {
                info = "noirq power domain ";
                callback = pm_noirq_op(&dev->pm_domain->ops, state);
@@ -1185,6 +1188,9 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as
 
        dpm_wait_for_children(dev, async);
 
+       if (async_error)
+               goto Complete;
+
        if (dev->pm_domain) {
                info = "late power domain ";
                callback = pm_late_early_op(&dev->pm_domain->ops, state);