diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-16 20:30:18 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-17 18:36:08 +0100 |
commit | 544e737dea5ad1a457f25dbddf68761ff25e028b (patch) | |
tree | a13a16253b52bda4aec4b8f1490f1857eeeaae33 /security/selinux/hooks.c | |
parent | 2585cf9dfaaddf00b069673f27bb3f8530e2039c (diff) |
PM: sleep: Fix error handling in dpm_prepare()
Commit 2aa36604e824 ("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: 2aa36604e824 ("PM: sleep: Avoid calling put_device() under dpm_list_mtx")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reported-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: All applicable <stable@vger.kernel.org>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions