WSL2-Linux-Kernel/drivers/base/power
Rafael J. Wysocki f4321ac030 PM: sleep: Fix error handling in dpm_prepare()
commit 544e737dea upstream.

Commit 2aa36604e8 ("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: 2aa36604e8 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-29 12:28:38 +01:00
..
Makefile PM / QoS: Initial kunit test 2019-11-29 12:04:49 +01:00
clock_ops.c PM: runtime: add devm_pm_clk_create helper 2021-08-26 11:28:07 -07:00
common.c PM / Domains: Introduce dev_pm_domain_start() 2019-11-13 11:41:50 +01:00
domain.c Merge back new PM domains material for v5.15. 2021-08-30 19:20:32 +02:00
domain_governor.c PM: domains: fix some kernel-doc issues 2021-06-08 14:56:11 +02:00
generic_ops.c drivers: base: power: add proper SPDX identifiers on files that did not have them. 2019-04-04 20:03:40 +02:00
main.c PM: sleep: Fix error handling in dpm_prepare() 2021-12-29 12:28:38 +01:00
power.h drivers/base/power: add dpm_sysfs_change_owner() 2020-02-26 20:07:25 -08:00
qos-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
qos.c PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY 2019-11-29 12:04:50 +01:00
runtime.c PM: runtime: add devm_pm_runtime_enable helper 2021-08-26 11:27:51 -07:00
sysfs.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
trace.c PM: base: power: don't try to use non-existing RTC for storing data 2021-09-14 09:56:20 +02:00
wakeirq.c PM: sleep: wakeirq: drop useless parameter from dev_pm_attach_wake_irq() 2021-09-07 21:10:09 +02:00
wakeup.c driver: base: Replace symbolic permissions with octal permissions 2021-07-21 14:56:00 +02:00
wakeup_stats.c PM: wakeup: remove redundant assignment to variable retval 2021-04-22 15:22:38 +02:00