Skip to content
Commit 544e737d authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: sleep: Fix error handling in dpm_prepare()



Commit 2aa36604 ("PM: sleep: Avoid calling put_device() under
dpm_list_mtx") forgot to update the while () loop termination
condition to also break the loop if error is nonzero, which
causes the loop to become infinite if device_prepare() returns
an error for one device.

Add the missing !error check.

Fixes: 2aa36604 ("PM: sleep: Avoid calling put_device() under dpm_list_mtx")
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reported-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Cc: All applicable <stable@vger.kernel.org>
parent 2585cf9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment