linux/drivers/base
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
..
firmware_loader firmware_loader: fix pre-allocated buf built-in firmware use 2021-11-25 09:48:27 +01:00
power PM: sleep: Fix error handling in dpm_prepare() 2021-12-29 12:28:38 +01:00
regmap regmap: Fix possible double-free in regcache_rbtree_exit() 2021-10-12 11:48:43 +01:00
test device property: build kunit tests without structleak plugin 2021-10-06 17:53:42 -06:00
arch_numa.c memblock: introduce saner 'memblock_free_ptr()' interface 2021-09-14 13:23:22 -07:00
arch_topology.c cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support 2021-08-30 10:43:35 +05:30
attribute_container.c
auxiliary.c
base.h
bus.c
cacheinfo.c
class.c
component.c component: do not leave master devres group open after bind 2021-11-18 19:16:08 +01:00
container.c
core.c driver core: Fix possible memory leak in device_link_add() 2021-11-18 19:16:50 +01:00
cpu.c
dd.c
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
module.c
node.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
pinctrl.c
platform-msi.c platform-msi: Add ABI to show msi_irqs of platform devices 2021-08-24 09:16:20 +02:00
platform.c
property.c
soc.c
swnode.c software node: balance refcount for managed software nodes 2021-09-16 13:13:48 +02:00
syscore.c
topology.c
trace.c
trace.h
transport_class.c