media: tc358746: Address compiler warnings
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 30 May 2023 10:16:39 +0000 (12:16 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 14 Jul 2023 07:14:09 +0000 (09:14 +0200)
commit9c2dcfc2cf0f2e4e0a0db33bc1a626e35928c475
tree4bdd84bd1910e0b3529ed9e9e01622e88c00361d
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
media: tc358746: Address compiler warnings

Address these compiler warnings by initialising the m_best and p_best
values to 0 and 1 respectively (as latter is used as a divisor):

   drivers/media/i2c/tc358746.c: In function 'tc358746_find_pll_settings':
>> drivers/media/i2c/tc358746.c:817:13: warning: 'p_best' is used uninitialized
[-Wuninitialized]
     817 |         u16 p_best, p;
         |             ^~~~~~
>> drivers/media/i2c/tc358746.c:816:13: warning: 'm_best' is used uninitialized
[-Wuninitialized]
     816 |         u16 m_best, mul;
         |             ^~~~~~

The warnings may well be a false positive but it is difficult for a
compiler to find out whether that truly is the case.

Closes: https://lore.kernel.org/oe-kbuild-all/202305301627.fLT3Bkds-lkp@intel.com/

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 80a21da3605 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/tc358746.c