Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [gdamjan:v7.1/imx471 2/2] drivers/media/i2c/imx471.c:809:37: warning: variable 'ret' is uninitialized when used here
@ 2026-05-06  5:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-06  5:01 UTC (permalink / raw)
  To: Kate Hsuan
  Cc: llvm, oe-kbuild-all,
	 Дамјан Георгиевски 

tree:   https://github.com/gdamjan/linux v7.1/imx471
head:   5e4a3f7372c3d9f499239c2476fcda1e8cc005d7
commit: 5e4a3f7372c3d9f499239c2476fcda1e8cc005d7 [2/2] media: i2c: imx471: Add Sony IMX471 image sensor driver
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260506/202605061217.i3Ehi8UQ-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605061217.i3Ehi8UQ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605061217.i3Ehi8UQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/i2c/imx471.c:809:37: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
     809 |                 return dev_err_probe(sensor->dev, ret,
         |                                                   ^~~
   drivers/media/i2c/imx471.c:805:9: note: initialize the variable 'ret' to silence this warning
     805 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +809 drivers/media/i2c/imx471.c

   796	
   797	static int imx471_check_hwcfg(struct imx471_data *sensor)
   798	{
   799		struct v4l2_fwnode_endpoint bus_cfg = {
   800			.bus_type = V4L2_MBUS_CSI2_DPHY,
   801		};
   802		struct fwnode_handle *ep, *fwnode = dev_fwnode(sensor->dev);
   803		struct clk *clk;
   804		unsigned long link_freq_bitmap;
   805		int ret;
   806	
   807		clk = devm_v4l2_sensor_clk_get(sensor->dev, NULL);
   808		if (IS_ERR(clk))
 > 809			return dev_err_probe(sensor->dev, ret,
   810					     "can't get clock frequency\n");
   811	
   812		if (clk_get_rate(clk) != IMX471_EXT_CLK)
   813			return dev_err_probe(sensor->dev, -EINVAL,
   814					     "external clock %lu is not supported\n",
   815					     clk_get_rate(clk));
   816	
   817		ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0, 0);
   818		ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
   819		fwnode_handle_put(ep);
   820		if (ret)
   821			return dev_err_probe(sensor->dev, ret,
   822					     "parsing endpoint failed");
   823	
   824		ret = v4l2_link_freq_to_bitmap(sensor->dev, bus_cfg.link_frequencies,
   825					       bus_cfg.nr_of_link_frequencies,
   826					       link_freq_menu_items,
   827					       ARRAY_SIZE(link_freq_menu_items),
   828					       &link_freq_bitmap);
   829	
   830		if (ret == -ENOENT)
   831			goto error_endpoint_free;
   832	
   833		if (ret == -ENODATA)
   834			goto error_endpoint_free;
   835	
   836	error_endpoint_free:
   837		v4l2_fwnode_endpoint_free(&bus_cfg);
   838	
   839		return ret;
   840	}
   841	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-06  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06  5:01 [gdamjan:v7.1/imx471 2/2] drivers/media/i2c/imx471.c:809:37: warning: variable 'ret' is uninitialized when used here kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox