summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/genpd.py
diff options
context:
space:
mode:
authorVivek BalachandharTN <vivek.balachandhar@gmail.com>2025-10-30 15:00:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-26 17:09:37 +0300
commitef48f0f19ec9d77888a23ab62fd2c9e409d81a3e (patch)
tree94c08a37839f15a092409fced603f29473c20895 /scripts/gdb/linux/genpd.py
parent05d36a5931d92310819e64fdee0cc1a35e14944c (diff)
downloadlinux-ef48f0f19ec9d77888a23ab62fd2c9e409d81a3e.tar.xz
misc: bh1770glc: use pm_runtime_resume_and_get() in power_state_store
pm_runtime_get_sync() may increment the runtime PM usage count even if the resume fails, which requires an explicit pm_runtime_put_noidle() to balance it. This driver ignored the return value, risking a usage-count leak on resume failure. Replace it with pm_runtime_resume_and_get(), which returns 0 on success and a negative errno on failure, and only increments the usage count on success. This simplifies the error path and avoids possible leaks. Also check for errors explicitly with `if (ret < 0)`. Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com> Link: https://patch.msgid.link/20251030120022.239951-1-vivek.balachandhar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/genpd.py')
0 files changed, 0 insertions, 0 deletions