Re: [V4, 2/2] media: i2c: Add Omnivision OV02A10 camera sensor driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[cannot apply to v5.3-rc7 next-20190904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/dongchun-zhu-mediatek-com/media-i2c-Add-support-for-OV02A10-sensor/20190908-065643
base:   git://linuxtv.org/media_tree.git master
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/media/i2c/ov02a10.c: In function 'ov02a10_set_ctrl':
>> drivers/media/i2c/ov02a10.c:699:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return ret;
            ^~~

vim +/ret +699 drivers/media/i2c/ov02a10.c

   658	
   659	static int ov02a10_set_ctrl(struct v4l2_ctrl *ctrl)
   660	{
   661		struct ov02a10 *ov02a10 = container_of(ctrl->handler,
   662						       struct ov02a10, ctrl_handler);
   663		struct i2c_client *client = v4l2_get_subdevdata(&ov02a10->subdev);
   664		s64 max_expo;
   665		int ret;
   666	
   667		/* Propagate change of current control to all related controls */
   668		if (ctrl->id == V4L2_CID_VBLANK) {
   669			/* Update max exposure while meeting expected vblanking */
   670			max_expo = ov02a10->cur_mode->height + ctrl->val -
   671				   OV02A10_EXPOSURE_MAX_MARGIN;
   672			__v4l2_ctrl_modify_range(ov02a10->exposure,
   673						 ov02a10->exposure->minimum, max_expo,
   674						 ov02a10->exposure->step,
   675						 ov02a10->exposure->default_value);
   676		}
   677	
   678		/* V4L2 controls values will be applied only when power is already up */
   679		if (!pm_runtime_get_if_in_use(&client->dev))
   680			return 0;
   681	
   682		switch (ctrl->id) {
   683		case V4L2_CID_EXPOSURE:
   684			ret = ov02a10_set_exposure(ov02a10, ctrl->val);
   685			break;
   686		case V4L2_CID_ANALOGUE_GAIN:
   687			ret = ov02a10_set_gain(ov02a10, ctrl->val);
   688			break;
   689		case V4L2_CID_VBLANK:
   690			ret = ov02a10_set_vblank(ov02a10, ctrl->val);
   691			break;
   692		case V4L2_CID_TEST_PATTERN:
   693			ret = ov02a10_set_test_pattern(ov02a10, ctrl->val);
   694			break;
   695		};
   696	
   697		pm_runtime_put(&client->dev);
   698	
 > 699		return ret;
   700	}
   701	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux