android_kernel_motorola_sm6375/kernel/power
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Wentao Liang a51dedd586 PM: hibernate: Add error handling for syscore_suspend()
[ Upstream commit e20a70c572539a486dbd91b225fa6a194a5e2122 ]

In hibernation_platform_enter(), the code did not check the
return value of syscore_suspend(), potentially leading to a
situation where syscore_resume() would be called even if
syscore_suspend() failed. This could cause unpredictable
behavior or system instability.

Modify the code sequence in question to properly handle errors returned
by syscore_suspend(). If an error occurs in the suspend path, the code
now jumps to label 'Enable_irqs' skipping the syscore_resume() call and
only enabling interrupts after setting the system state to SYSTEM_RUNNING.

Fixes: 40dc166cb5 ("PM / Core: Introduce struct syscore_ops for core subsystems PM")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20250119143205.2103-1-vulab@iscas.ac.cn
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-13 12:42:59 +01:00
..
autosleep.c PM / wakeup: Show wakeup sources stats in sysfs 2019-08-21 00:20:40 +02:00
console.c
energy_model.c PM: EM: Increase energy calculation precision 2021-09-15 09:47:33 +02:00
hibernate.c PM: hibernate: Add error handling for syscore_suspend() 2025-03-13 12:42:59 +01:00
Kconfig pci-v5.3-changes 2019-07-15 20:44:49 -07:00
main.c PM: s2idle: ACPI: Fix wakeup interrupts handling 2022-02-16 12:52:50 +01:00
Makefile PM: Introduce an Energy Model management framework 2018-12-11 15:16:58 +01:00
power.h PM: hibernate: powerpc: Expose pfn_is_nosave() prototype 2019-06-14 10:48:56 +02:00
poweroff.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 248 2019-06-19 17:09:08 +02:00
process.c PM: s2idle: ACPI: Fix wakeup interrupts handling 2022-02-16 12:52:50 +01:00
qos.c PM: QoS: Invalidate frequency QoS requests after removal 2019-11-20 10:46:42 +01:00
snapshot.c PM: hibernate: Clean up sync_read handling in snapshot_write_next() 2023-11-28 16:50:19 +00:00
suspend.c PM: suspend: Set mem_sleep_current during kernel command line setup 2024-04-13 12:51:24 +02:00
suspend_test.c PM: suspend: fix return value of __setup handler 2022-04-15 14:18:05 +02:00
swap.c PM: hibernate: Enforce ordering during image compression/decompression 2024-02-23 08:24:48 +01:00
user.c PM: hibernate: defer device probing when resuming from hibernation 2022-08-25 11:17:32 +02:00
wakelock.c PM: wakeup: simplify the output logic of pm_show_wakelocks() 2022-02-01 17:24:34 +01:00