diff options
| author | Jason A. Donenfeld <[email protected]> | 2022-09-24 12:11:51 +0200 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2022-09-25 14:22:11 -0700 |
| commit | f9c0cf8f26de367c58e48b02b1cdb9c377626e6f (patch) | |
| tree | f8bb9261a7baf1362456d9f1c6e66f052aabd677 /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
| parent | 1b2f9b1e6dd36a64b84f65078322109ffc453f0c (diff) | |
hwmon: (sht4x) do not overflow clamping operation on 32-bit platforms
On 32-bit platforms, long is 32 bits, so (long)UINT_MAX is less than
(long)SHT4X_MIN_POLL_INTERVAL, which means the clamping operation is
bogus. Fix this by clamping at INT_MAX, so that the upperbound is the
same on all platforms.
Signed-off-by: Jason A. Donenfeld <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions