All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/media/pci/intel/ipu-bridge.c:552 ipu_bridge_instantiate_vcm_work() warn: passing positive error code '(-19)' to 'PTR_ERR'
Date: Sat, 15 Mar 2025 06:29:30 +0800	[thread overview]
Message-ID: <202503150601.brcfclpJ-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Ricardo Ribalda <ribalda@chromium.org>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media@vger.kernel.org
CC: Sakari Ailus <sakari.ailus@linux.intel.com>

Hi Ricardo,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   83158b21ae9a1a5c8285c3d542981bae914e26b6
commit: 93da10eee90b2ffa4b496dd4a6ea276c57461fb6 media: intel/ipu6: Fix direct dependency Kconfig error
date:   11 months ago
:::::: branch date: 88 minutes ago
:::::: commit date: 11 months ago
config: openrisc-randconfig-r072-20250314 (https://download.01.org/0day-ci/archive/20250315/202503150601.brcfclpJ-lkp@intel.com/config)
compiler: or1k-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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503150601.brcfclpJ-lkp@intel.com/

New smatch warnings:
drivers/media/pci/intel/ipu-bridge.c:552 ipu_bridge_instantiate_vcm_work() warn: passing positive error code '(-19)' to 'PTR_ERR'

Old smatch warnings:
drivers/media/pci/intel/ipu-bridge.c:752 ipu_bridge_ivsc_is_ready() warn: iterator 'i' not incremented

vim +552 drivers/media/pci/intel/ipu-bridge.c

8e3e916e23f5ab0 Hans de Goede 2023-07-05  523  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  524  static void ipu_bridge_instantiate_vcm_work(struct work_struct *work)
8e3e916e23f5ab0 Hans de Goede 2023-07-05  525  {
8e3e916e23f5ab0 Hans de Goede 2023-07-05  526  	struct ipu_bridge_instantiate_vcm_work_data *data =
8e3e916e23f5ab0 Hans de Goede 2023-07-05  527  		container_of(work, struct ipu_bridge_instantiate_vcm_work_data,
8e3e916e23f5ab0 Hans de Goede 2023-07-05  528  			     work);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  529  	struct acpi_device *adev = ACPI_COMPANION(data->sensor);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  530  	struct i2c_client *vcm_client;
8e3e916e23f5ab0 Hans de Goede 2023-07-05  531  	bool put_fwnode = true;
8e3e916e23f5ab0 Hans de Goede 2023-07-05  532  	int ret;
8e3e916e23f5ab0 Hans de Goede 2023-07-05  533  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  534  	/*
8e3e916e23f5ab0 Hans de Goede 2023-07-05  535  	 * The client may get probed before the device_link gets added below
8e3e916e23f5ab0 Hans de Goede 2023-07-05  536  	 * make sure the sensor is powered-up during probe.
8e3e916e23f5ab0 Hans de Goede 2023-07-05  537  	 */
8e3e916e23f5ab0 Hans de Goede 2023-07-05  538  	ret = pm_runtime_get_sync(data->sensor);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  539  	if (ret < 0) {
8e3e916e23f5ab0 Hans de Goede 2023-07-05  540  		dev_err(data->sensor, "Error %d runtime-resuming sensor, cannot instantiate VCM\n",
8e3e916e23f5ab0 Hans de Goede 2023-07-05  541  			ret);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  542  		goto out_pm_put;
8e3e916e23f5ab0 Hans de Goede 2023-07-05  543  	}
8e3e916e23f5ab0 Hans de Goede 2023-07-05  544  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  545  	/*
8e3e916e23f5ab0 Hans de Goede 2023-07-05  546  	 * Note the client is created only once and then kept around
8e3e916e23f5ab0 Hans de Goede 2023-07-05  547  	 * even after a rmmod, just like the software-nodes.
8e3e916e23f5ab0 Hans de Goede 2023-07-05  548  	 */
8e3e916e23f5ab0 Hans de Goede 2023-07-05  549  	vcm_client = i2c_acpi_new_device_by_fwnode(acpi_fwnode_handle(adev),
8e3e916e23f5ab0 Hans de Goede 2023-07-05  550  						   1, &data->board_info);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  551  	if (IS_ERR(vcm_client)) {
8e3e916e23f5ab0 Hans de Goede 2023-07-05 @552  		dev_err(data->sensor, "Error instantiating VCM client: %ld\n",
8e3e916e23f5ab0 Hans de Goede 2023-07-05  553  			PTR_ERR(vcm_client));
8e3e916e23f5ab0 Hans de Goede 2023-07-05  554  		goto out_pm_put;
8e3e916e23f5ab0 Hans de Goede 2023-07-05  555  	}
8e3e916e23f5ab0 Hans de Goede 2023-07-05  556  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  557  	device_link_add(&vcm_client->dev, data->sensor, DL_FLAG_PM_RUNTIME);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  558  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  559  	dev_info(data->sensor, "Instantiated %s VCM\n", data->board_info.type);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  560  	put_fwnode = false; /* Ownership has passed to the i2c-client */
8e3e916e23f5ab0 Hans de Goede 2023-07-05  561  
8e3e916e23f5ab0 Hans de Goede 2023-07-05  562  out_pm_put:
8e3e916e23f5ab0 Hans de Goede 2023-07-05  563  	pm_runtime_put(data->sensor);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  564  	put_device(data->sensor);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  565  	if (put_fwnode)
8e3e916e23f5ab0 Hans de Goede 2023-07-05  566  		fwnode_handle_put(data->board_info.fwnode);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  567  	kfree(data);
8e3e916e23f5ab0 Hans de Goede 2023-07-05  568  }
8e3e916e23f5ab0 Hans de Goede 2023-07-05  569  

:::::: The code at line 552 was first introduced by commit
:::::: 8e3e916e23f5ab0ceb046d57f4d41d53159b8192 media: ipu-bridge: Add a runtime-pm device-link between VCM and sensor

:::::: TO: Hans de Goede <hdegoede@redhat.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-03-14 22:29 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=202503150601.brcfclpJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.