Linux Media Controller development
 help / color / mirror / Atom feed
* [sailus-media-tree:ipu6-more 3/5] drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:485:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true
@ 2026-10-10 21:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-10 21:11 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: llvm, oe-kbuild-all, linux-media

tree:   git://linuxtv.org/sailus/media_tree.git ipu6-more
head:   80de48e2cab73a7c38171de3de224456c804f6bc
commit: 5793439341f94991ce1f137ce1e5fdb616d2e23a [3/5] media: ipu6: Prevent starting streaming if ISYS needs reset
config: x86_64-randconfig-1009-20261010 (https://download.01.org/0day-ci/archive/20261011/202610110422.Ds1dqsa4-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261011/202610110422.Ds1dqsa4-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/202610110422.Ds1dqsa4-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:485:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     485 |                 if (av->isys->need_reset)
         |                     ^~~~~~~~~~~~~~~~~~~~
   drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:527:9: note: uninitialized use occurs here
     527 |         return ret;
         |                ^~~
   drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:485:3: note: remove the 'if' if its condition is always false
     485 |                 if (av->isys->need_reset)
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
     486 |                         goto out_return_buffers;
         |                         ~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:478:9: note: initialize the variable 'ret' to silence this warning
     478 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +485 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c

   469	
   470	static int start_streaming(struct vb2_queue *q, unsigned int count)
   471	{
   472		struct ipu6_isys_queue *aq = vb2_queue_to_isys_queue(q);
   473		struct ipu6_isys_video *av = ipu6_isys_queue_to_video(aq);
   474		struct device *dev = &av->isys->adev->auxdev.dev;
   475		const struct ipu6_isys_pixelformat *pfmt =
   476			ipu6_isys_get_isys_format(ipu6_isys_get_format(av), 0);
   477		struct media_pad *source_pad, *remote_pad;
   478		int ret;
   479	
   480		dev_dbg(dev, "stream: %s: width %u, height %u, css pixelformat %u\n",
   481			av->vdev.name, ipu6_isys_get_frame_width(av),
   482			ipu6_isys_get_frame_height(av), pfmt->css_pixelformat);
   483	
   484		scoped_guard(mutex, &av->isys->mutex) {
 > 485			if (av->isys->need_reset)
   486				goto out_return_buffers;
   487		}
   488	
   489		remote_pad = media_pad_remote_pad_unique(&av->pad);
   490		if (IS_ERR(remote_pad)) {
   491			dev_dbg(dev, "failed to get remote pad\n");
   492			ret = PTR_ERR(remote_pad);
   493			goto out_return_buffers;
   494		}
   495	
   496		source_pad = media_pad_remote_pad_unique(&remote_pad->entity->pads[0]);
   497		if (IS_ERR(source_pad)) {
   498			dev_dbg(dev, "No external source entity\n");
   499			ret = PTR_ERR(source_pad);
   500			goto out_return_buffers;
   501		}
   502	
   503		ret = video_device_pipeline_alloc_start(&av->vdev);
   504		if (ret < 0)
   505			goto out_return_buffers;
   506	
   507		ret = ipu6_isys_link_fmt_validate(aq);
   508		if (ret) {
   509			dev_dbg(dev,
   510				"%s: link format validation failed (%d)\n",
   511				av->vdev.name, ret);
   512			goto out_pipeline_stop;
   513		}
   514	
   515		ret = ipu6_isys_stream_start(av);
   516		if (ret)
   517			goto out_pipeline_stop;
   518	
   519		return 0;
   520	
   521	out_pipeline_stop:
   522		ipu6_isys_stream_cleanup(av);
   523	
   524	out_return_buffers:
   525		return_buffers(aq, VB2_BUF_STATE_QUEUED);
   526	
   527		return ret;
   528	}
   529	

--
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-10-10 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-10 21:11 [sailus-media-tree:ipu6-more 3/5] drivers/media/pci/intel/ipu6/ipu6-isys-queue.c:485:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true 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