summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSurendra Singh Chouhan <kr494167@gmail.com>2026-07-24 19:28:03 +0530
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-08-19 16:41:00 +0200
commit092755367e1a5fcf0f5405e9425e86907199dfce (patch)
tree5e662d83fb911c60103af968671a33944b447680 /tools/perf/scripts/python/stackcollapse.py
parent9c48a53685040bb0de45a640b34055cbbfc69d4f (diff)
rtc: spacemit: handle regmap_test_bits() error return
p1_rtc_read_time() called if (!regmap_test_bits(regmap, RTC_CTRL, RTC_EN)) to check if the RTC was enabled. regmap_test_bits() returns 1 if the bit is set, 0 if not set, and a negative error code (e.g. -EIO) if reading the control register fails. Using !regmap_test_bits(...) evaluates a negative error code as boolean false, causing I2C/regmap read failures to be ignored and incorrectly proceeding to read time registers from a failing device. Fix this by capturing the return value of regmap_test_bits() and returning the error code if negative, or -EINVAL if the RTC is disabled. Fixes: a6de182daa2b ("rtc: spacemit: support the SpacemiT P1 RTC") Reviewed-by: Alex Elder <elder@riscstar.com> Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com> Link: https://patch.msgid.link/20260724135803.81223-1-kr494167@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions