diff options
author | Fabrice Gasnier <[email protected]> | 2021-03-02 15:43:55 +0100 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2021-03-06 16:47:03 +0000 |
commit | e4c3e133294c0a292d21073899b05ebf530169bd (patch) | |
tree | b1929940b125ccc62167296cd29e58c795710285 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | fae6f62e6a580b663ecf42c2120a0898deae9137 (diff) |
counter: stm32-timer-cnt: fix ceiling write max value
The ceiling value isn't checked before writing it into registers. The user
could write a value higher than the counter resolution (e.g. 16 or 32 bits
indicated by max_arr). This makes most significant bits to be truncated.
Fix it by checking the max_arr to report a range error [1] to the user.
[1] https://lkml.org/lkml/2021/2/12/358
Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
Signed-off-by: Fabrice Gasnier <[email protected]>
Acked-by: William Breathitt Gray <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions