lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 5 Jan 2021 12:51:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Maxime Chevallier <maxime.chevallier@...tlin.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Hans Verkuil <hverkuil@...all.nl>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-media@...r.kernel.org,
        Maxime Chevallier <maxime.chevallier@...tlin.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Subject: Re: [PATCH v3 3/3] media: i2c: Introduce a driver for the Techwell
 TW9900 decoder

Hi Maxime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on robh/for-next linus/master v5.11-rc2 next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Maxime-Chevallier/media-i2c-Introduce-driver-for-the-TW9900-decoder/20201223-000948
base:   git://linuxtv.org/media_tree.git master
config: arm64-randconfig-r001-20210105 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/cdf8ecd519454783c60d4bca02b9279f8133ef77
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maxime-Chevallier/media-i2c-Introduce-driver-for-the-TW9900-decoder/20201223-000948
        git checkout cdf8ecd519454783c60d4bca02b9279f8133ef77
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/media/i2c/tw9900.c:521:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                   return ret;
                          ^~~
   drivers/media/i2c/tw9900.c:505:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +/ret +521 drivers/media/i2c/tw9900.c

   498	
   499	static int tw9900_probe(struct i2c_client *client,
   500				const struct i2c_device_id *id)
   501	{
   502		struct device *dev = &client->dev;
   503		struct v4l2_ctrl_handler *hdl;
   504		struct tw9900 *tw9900;
   505		int ret;
   506	
   507		tw9900 = devm_kzalloc(dev, sizeof(*tw9900), GFP_KERNEL);
   508		if (!tw9900)
   509			return -ENOMEM;
   510	
   511		tw9900->client = client;
   512		tw9900->cur_mode = &supported_modes[0];
   513	
   514		tw9900->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
   515		if (IS_ERR(tw9900->reset_gpio))
   516			tw9900->reset_gpio = NULL;
   517	
   518		tw9900->regulator = devm_regulator_get(&tw9900->client->dev, "vdd");
   519		if (IS_ERR(tw9900->regulator)) {
   520			dev_err(dev, "Failed to get power regulator\n");
 > 521			return ret;
   522		}
   523	
   524		v4l2_i2c_subdev_init(&tw9900->subdev, client, &tw9900_subdev_ops);
   525		tw9900->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
   526					V4L2_SUBDEV_FL_HAS_EVENTS;
   527	
   528		hdl = &tw9900->hdl;
   529	
   530		v4l2_ctrl_handler_init(hdl, 2);
   531	
   532		v4l2_ctrl_new_std(hdl, &tw9900_ctrl_ops, V4L2_CID_BRIGHTNESS,
   533				  -128, 127, 1, 0);
   534		v4l2_ctrl_new_std(hdl, &tw9900_ctrl_ops, V4L2_CID_CONTRAST,
   535				  0, 255, 1, 0x60);
   536	
   537		tw9900->subdev.ctrl_handler = hdl;
   538		if (hdl->error) {
   539			int err = hdl->error;
   540	
   541			v4l2_ctrl_handler_free(hdl);
   542			return err;
   543		}
   544	
   545		ret = tw9900_power_on(tw9900);
   546		if (ret)
   547			return ret;
   548	
   549		ret = tw9900_check_id(tw9900, client);
   550		if (ret)
   551			goto err_power_off;
   552	
   553		tw9900->subdev.internal_ops = &tw9900_internal_ops;
   554		tw9900->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
   555		tw9900->pad.flags = MEDIA_PAD_FL_SOURCE;
   556		tw9900->subdev.entity.function = MEDIA_ENT_F_DV_DECODER;
   557	
   558		ret = media_entity_pads_init(&tw9900->subdev.entity, 1, &tw9900->pad);
   559		if (ret < 0)
   560			goto err_power_off;
   561	
   562		ret = v4l2_async_register_subdev(&tw9900->subdev);
   563		if (ret) {
   564			dev_err(dev, "v4l2 async register subdev failed\n");
   565			goto err_clean_entity;
   566		}
   567	
   568		pm_runtime_set_active(dev);
   569		pm_runtime_enable(dev);
   570		pm_runtime_idle(dev);
   571	
   572		return 0;
   573	
   574	err_clean_entity:
   575		media_entity_cleanup(&tw9900->subdev.entity);
   576	err_power_off:
   577		tw9900_power_off(tw9900);
   578	
   579		return ret;
   580	}
   581	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (46997 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ