diff options
| author | Praveen Talari <praveen.talari@oss.qualcomm.com> | 2026-07-10 15:42:44 +0530 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-10 11:42:55 +0100 |
| commit | d8e9ea989acb54508477e4a8c9d9eaf8217e0081 (patch) | |
| tree | c47a46b880af1de8189d8c41e71130eb5e2e91b3 /tools/perf/scripts/python/flamegraph.py | |
| parent | 4f98f533f6470507d62a3ee4a4ba74de40772667 (diff) | |
spi: qcom-geni: Fix missing error check on pm_runtime_get_sync()
spi_geni_init() calls pm_runtime_get_sync() to power up the device
before accessing hardware registers, but never checks the return value.
If the runtime resume fails, the function silently proceeds to read and
write hardware registers on a device that may not be powered up, leading
to register access faults.
Fix this by replacing pm_runtime_get_sync() with the
PM_RUNTIME_ACQUIRE_IF_ENABLED() macro and checking the result via
PM_RUNTIME_ACQUIRE_ERR(), propagating any error back to the caller
immediately before any hardware access occurs.
Since the macro handles its own cleanup on failure, the out_pm label and
the corresponding pm_runtime_put() call are no longer needed. Replace
all goto out_pm paths with direct return ret statements and remove the
label entirely.
Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP")
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Link: https://patch.msgid.link/20260710-fix_sticky_-einval_after_pm_runtime_api_failure-v4-2-be81d6c15043@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
