diff options
| author | Surendra Singh Chouhan <kr494167@gmail.com> | 2026-07-24 18:28:57 +0530 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-30 00:50:15 +0100 |
| commit | 623d9a55685c52b10b995d8dbde9da6283170220 (patch) | |
| tree | cb6b38622ac8b24508478f666bc0fe5656ef253c /tools/perf/scripts/python/task-analyzer.py | |
| parent | 99bc5744e966911e706b857feba7cd877ec3ccb4 (diff) | |
regulator: tps65185: handle gpiod_get_value_cansleep() error returns
tps65185_vposneg_enable() evaluated:
if (gpiod_get_value_cansleep(data->pgood_gpio) != 1)
return -ETIMEDOUT;
gpiod_get_value_cansleep() returns 1 if active, 0 if inactive, and a
negative error code (e.g. -EIO or -EINVAL) on failure. Evaluating != 1
treats a negative error code as non-equal, swallowing GPIO read errors and
masking them as -ETIMEDOUT.
Fix this by capturing the return value of gpiod_get_value_cansleep(). If
it returns a negative error code, propagate that error immediately; if
it returns 0 (inactive), return -ETIMEDOUT.
Fixes: b0fc1e770194 ("regulator: Add TPS65185 driver")
Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patch.msgid.link/20260724125858.75635-1-kr494167@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
