Commit 079e8889 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: sleep: Fix list splicing in device suspend error paths

Commits aa7a9275 ("PM: sleep: Suspend async parents after suspending
children") and 443046d1 ("PM: sleep: Make suspend of devices more
asynchronous") added list splicing to the error paths of dpm_suspend(),
dpm_suspend_late(), and dpm_noirq_suspend_devices(), but they should
have used the list_splice_init() variant because the emptied list is
used going forward in all of these cases.

Replace list_splice() with list_splice_init() in the code in question as
appropriate.

Fixes: aa7a9275 ("PM: sleep: Suspend async parents after suspending children")
Fixes: 443046d1 ("PM: sleep: Make suspend of devices more asynchronous")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4280


Reported-and-tested-by: default avatarChris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/4659282.LvFx2qVVIh@rjwysocki.net
parent 976aa630
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment