提交 aa1b9f13 编写于 作者: U Ulf Hansson 提交者: Rafael J. Wysocki

PM / Runtime: Fix error path for prepare

If a device prepare callback for some reason would fail, the PM core
prevented the device from going inactive forever.

In this case, to reverse the pm_runtime_get_noresume() we invokes the
asyncronous pm_runtime_put(), thus restoring the usage count.
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 ea309944
......@@ -1277,6 +1277,9 @@ static int device_prepare(struct device *dev, pm_message_t state)
device_unlock(dev);
if (error)
pm_runtime_put(dev);
return error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册