diff options
author | Miquel Raynal | 2022-05-20 10:25:00 +0200 |
---|---|---|
committer | Alexandre Belloni | 2022-05-25 01:24:21 +0200 |
commit | 3f3489248927a53fcfec571ff603163f6b676a46 (patch) | |
tree | 3b31bfafc881a2d0ea5c0b8fa56c25824cca6e39 /drivers/media/spi | |
parent | 0b6da785130d9e8cf33d001a7bf08a979c87d019 (diff) |
rtc: rzn1: Fix a variable type
The calculation in ->set_offset() handles both negative and positive
offsets. The 'steps' variable will be checked to be in a specific [-x;
+x] range, which means it must be a signed integer rather than
unsigned.
This also fixes the following smatch warning:
warn: 'steps' 'true' implies 'steps > 0' is 'true'
Fixes: be4a11cf98af ("rtc: rzn1: Add oscillator offset support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220520082500.489248-1-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/media/spi')
0 files changed, 0 insertions, 0 deletions