Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 719be8e5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PM: Fix a bug in dpm_suspend_late()"

parents e4d39e9e 1d7ea992
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1000,6 +1000,7 @@ static int device_suspend_late(struct device *dev, pm_message_t state)
{
	pm_callback_t callback = NULL;
	char *info = NULL;
	int error = 0;

	__pm_runtime_disable(dev, false);

@@ -1025,7 +1026,15 @@ static int device_suspend_late(struct device *dev, pm_message_t state)
		callback = pm_late_early_op(dev->driver->pm, state);
	}

	return dpm_run_callback(callback, dev, state, info);
	error = dpm_run_callback(callback, dev, state, info);
	if (error)
		/*
		 * dpm_resume_early wouldn't be run for this failed device,
		 * hence enable runtime_pm now
		 */
		pm_runtime_enable(dev);

	return error;
}

/**