diff options
| author | Yuho Choi <dbgh9129@gmail.com> | 2026-06-08 20:07:48 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-06-09 19:10:46 +0300 |
| commit | 51a7c560cffdd3653ac2b930d01410569b23b23e (patch) | |
| tree | 4aad011fa960a5c2320d21cff8a1e987b277679a /include/linux/stackprotector.h | |
| parent | 4549871118cf616eecdd2d939f78e3b9e1dddc48 (diff) | |
| download | linux-51a7c560cffdd3653ac2b930d01410569b23b23e.tar.xz | |
PM: QoS: Fix misc device registration unwind
cpu_latency_qos_init() registers cpu_dma_latency first and, when
CONFIG_PM_QOS_CPU_SYSTEM_WAKEUP is enabled, registers cpu_wakeup_latency
afterwards. The second registration overwrites the first return value.
As a result, a failure to register cpu_dma_latency can be masked if the
second registration succeeds. Conversely, if cpu_dma_latency succeeds and
cpu_wakeup_latency fails, the function returns an error while leaving the
first misc device registered.
Return immediately on the first registration failure and deregister
cpu_dma_latency if the second registration fails.
Fixes: a4e6512a79d8 ("PM: QoS: Introduce a CPU system wakeup QoS limit")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Link: https://patch.msgid.link/20260608170748.82273-1-dbgh9129@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
