Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kate Hsuan <hpa@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	" Дамјан Георгиевски " <gdamjan@gmail.com>
Subject: [gdamjan:v7.1/imx471 2/2] drivers/media/i2c/imx471.c:809:37: warning: variable 'ret' is uninitialized when used here
Date: Wed, 06 May 2026 13:01:14 +0800	[thread overview]
Message-ID: <202605061217.i3Ehi8UQ-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-05-06  5:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202605061217.i3Ehi8UQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gdamjan@gmail.com \
    --cc=hpa@redhat.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox