media: ccs-pll: Initialise best_div to avoid a compiler warning
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 1 Aug 2023 07:14:29 +0000 (10:14 +0300)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:33 +0000 (07:58 +0200)
Initialise best_div local variable to avoid a compiler warning. The
warning was harmless though.

Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ccs-pll.c

index fcc3936..cf8858c 100644 (file)
@@ -296,7 +296,7 @@ __ccs_pll_calculate_vt_tree(struct device *dev,
        struct ccs_pll_branch_fr *pll_fr = &pll->vt_fr;
        struct ccs_pll_branch_bk *pll_bk = &pll->vt_bk;
        u32 more_mul;
-       u16 best_pix_div = SHRT_MAX >> 1, best_div;
+       u16 best_pix_div = SHRT_MAX >> 1, best_div = lim_bk->max_sys_clk_div;
        u16 vt_div, min_sys_div, max_sys_div, sys_div;
 
        pll_fr->pll_ip_clk_freq_hz =