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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef0fea13-1bc0-4661-8d20-079445086f14@amd.com>
Date: Fri, 14 Mar 2025 13:01:22 -0400
From: "Nirujogi, Pratap" <pnirujog@....com>
To: Dan Carpenter <dan.carpenter@...aro.org>, oe-kbuild@...ts.linux.dev,
 Pratap Nirujogi <pratap.nirujogi@....com>, mchehab@...nel.org,
 sakari.ailus@...ux.intel.com, hverkuil@...all.nl,
 laurent.pinchart@...asonboard.com, dave.stevenson@...pberrypi.com
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
 linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
 benjamin.chan@....com, bin.du@....com, gjorgji.rosikopulos@....com,
 king.li@....com, dominic.antony@....com
Subject: Re: [PATCH] media: i2c: Add OV05C camera sensor driver

Hi Dan,

Thanks for reporting this issue.

Thanks,
Pratap


On 3/14/2025 3:42 AM, Dan Carpenter wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> Hi Pratap,
> 
> kernel test robot noticed the following build warnings:
> 
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Pratap-Nirujogi/media-i2c-Add-OV05C-camera-sensor-driver/20250301-005638
> base:   https://git.linuxtv.org/media-ci/media-pending.git master
> patch link:    https://lore.kernel.org/r/20250228165317.3468075-1-pratap.nirujogi%40amd.com
> patch subject: [PATCH] media: i2c: Add OV05C camera sensor driver
> config: arm64-randconfig-r071-20250312 (https://download.01.org/0day-ci/archive/20250314/202503140559.3mp2n2oI-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 14.2.0
> 
> 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@...el.com>
> | Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> | Closes: https://lore.kernel.org/r/202503140559.3mp2n2oI-lkp@intel.com/
> 
> smatch warnings:
> drivers/media/i2c/ov05c.c:936 ov05c_probe() warn: passing zero to 'PTR_ERR'
> 
> vim +/PTR_ERR +936 drivers/media/i2c/ov05c.c
> 
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  922  static int ov05c_probe(struct i2c_client *client)
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  923  {
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  924         struct ov05c *ov05c;
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  925         int i, ret;
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  926
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  927         ov05c = devm_kzalloc(&client->dev, sizeof(*ov05c), GFP_KERNEL);
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  928         if (!ov05c)
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  929                 return -ENOMEM;
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  930
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  931         client->dev.init_name = DRV_NAME;
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  932
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  933         /* create sensor enable gpio control */
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  934         ov05c->enable_gpio = devm_gpiod_get(&client->dev, "sensor0_enable", GPIOD_OUT_LOW);
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  935         if (IS_ERR_OR_NULL(ov05c->enable_gpio))
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28 @936                 return PTR_ERR(ov05c->enable_gpio);
> 
> If devm_gpiod_get() returns NULL then we'd return success, but actually
> devm_gpiod_get() can't return NULL.  Only error pointers.
> 

We are working on the feedback provided by reviewers on v1, we will take 
care of this issue too replacing IS_ERR_OR_NULL() with IS_ERR() while 
submitting the v2. Thank you!

> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  937
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  938         /* Initialize subdev */
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  939         v4l2_i2c_subdev_init(&ov05c->sd, client, &ov05c_subdev_ops);
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  940
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  941         /* Initialize CCI */
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  942         ov05c->regmap = devm_cci_regmap_init_i2c(client, 8);
> 6da03431f4f1e18 Pratap Nirujogi 2025-02-28  943         if (IS_ERR(ov05c->regmap)) {
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ