Skip to content

Commit c9a1dd6

Browse files
rtc: zynqmp: initialize fract_tick
fract_tick is used uninitialized when fract_offset is 0 Reported-by: kernel test robot <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5adbaed commit c9a1dd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-zynqmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int xlnx_rtc_set_offset(struct device *dev, long offset)
203203
struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev);
204204
unsigned long long rtc_ppb = RTC_PPB;
205205
unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq);
206-
unsigned char fract_tick;
206+
unsigned char fract_tick = 0;
207207
unsigned int calibval;
208208
short int max_tick;
209209
int fract_offset;

0 commit comments

Comments
 (0)