[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f95f3450-a938-27c4-ecc7-bafbb41f2f9b@amd.com>
Date: Wed, 27 Jul 2022 12:56:37 +0200
From: Michal Simek <michal.simek@....com>
To: <alexandre.belloni@...tlin.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Michal Simek <michal.simek@...inx.com>
CC: <linux-rtc@...r.kernel.org>, kernel test robot <lkp@...el.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rtc: zynqmp: initialize fract_tick
On 7/27/22 12:00, alexandre.belloni@...tlin.com wrote:
> From: Alexandre Belloni <alexandre.belloni@...tlin.com>
>
> fract_tick is used uninitialized when fract_offset is 0
>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
> ---
> drivers/rtc/rtc-zynqmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c
> index 1dd389b891fe..c9b85c838ebe 100644
> --- a/drivers/rtc/rtc-zynqmp.c
> +++ b/drivers/rtc/rtc-zynqmp.c
> @@ -203,7 +203,7 @@ static int xlnx_rtc_set_offset(struct device *dev, long offset)
> struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev);
> unsigned long long rtc_ppb = RTC_PPB;
> unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq);
> - unsigned char fract_tick;
> + unsigned char fract_tick = 0;
> unsigned int calibval;
> short int max_tick;
> int fract_offset;
> --
> 2.36.1
>
Reviewed-by: Michal Simek <michal.simek@....com>
Thanks,
Michal
Powered by blists - more mailing lists