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: [linux-next:master 7134/10031] drivers/regulator/tps65219-regulator.c:407 tps65219_regulator_probe() error: uninitialized symbol 'rdev'.
Date: Sat, 10 May 2025 06:06:35 +0800	[thread overview]
Message-ID: <202505100652.RkAzg3df-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Shree Ramamoorthy <s-ramamoorthy@ti.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ed61cb3d78d585209ec775933078e268544fe9a4
commit: 38c9f98db20a649a1f8454f507608b6aef0c9297 [7134/10031] regulator: tps65219: Add support for TPS65215 Regulator IRQs
:::::: branch date: 12 hours ago
:::::: commit date: 8 days ago
config: x86_64-randconfig-161-20250508 (https://download.01.org/0day-ci/archive/20250510/202505100652.RkAzg3df-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)

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/202505100652.RkAzg3df-lkp@intel.com/

New smatch warnings:
drivers/regulator/tps65219-regulator.c:407 tps65219_regulator_probe() error: uninitialized symbol 'rdev'.
drivers/regulator/tps65219-regulator.c:407 tps65219_regulator_probe() warn: passing zero to 'PTR_ERR'

Old smatch warnings:
drivers/regulator/tps65219-regulator.c:430 tps65219_regulator_probe() error: uninitialized symbol 'rdev'.
drivers/regulator/tps65219-regulator.c:430 tps65219_regulator_probe() warn: passing zero to 'PTR_ERR'

vim +/rdev +407 drivers/regulator/tps65219-regulator.c

3f2e457efdad5a Shree Ramamoorthy 2025-04-25  350  
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  351  static int tps65219_regulator_probe(struct platform_device *pdev)
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  352  {
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  353  	struct tps65219_regulator_irq_data *irq_data;
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  354  	struct tps65219_regulator_irq_type *irq_type;
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  355  	struct tps65219_chip_data *pmic;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  356  	struct regulator_dev *rdev;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  357  	int error;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  358  	int irq;
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  359  	int i;
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  360  
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  361  	struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent);
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  362  	struct regulator_config config = { };
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  363  	enum pmic_id chip = platform_get_device_id(pdev)->driver_data;
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  364  
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  365  	pmic = &chip_info_table[chip];
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  366  
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  367  	config.dev = tps->dev;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  368  	config.driver_data = tps;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  369  	config.regmap = tps->regmap;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  370  
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  371  	for (i = 0; i <  pmic->common_rdesc_size; i++) {
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  372  		rdev = devm_regulator_register(&pdev->dev, &pmic->common_rdesc[i],
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  373  					       &config);
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  374  		if (IS_ERR(rdev))
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  375  			return dev_err_probe(tps->dev, PTR_ERR(rdev),
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  376  					      "Failed to register %s regulator\n",
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  377  					      pmic->common_rdesc[i].name);
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  378  	}
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  379  
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  380  	for (i = 0; i <  pmic->rdesc_size; i++) {
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  381  		rdev = devm_regulator_register(&pdev->dev, &pmic->rdesc[i],
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  382  					       &config);
e7ce0437709552 Shree Ramamoorthy 2024-12-17  383  		if (IS_ERR(rdev))
e7ce0437709552 Shree Ramamoorthy 2024-12-17  384  			return dev_err_probe(tps->dev, PTR_ERR(rdev),
e7ce0437709552 Shree Ramamoorthy 2024-12-17  385  					     "Failed to register %s regulator\n",
3f2e457efdad5a Shree Ramamoorthy 2025-04-25  386  					     pmic->rdesc[i].name);
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  387  	}
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  388  
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  389  	irq_data = devm_kmalloc(tps->dev, pmic->common_irq_size, GFP_KERNEL);
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  390  	if (!irq_data)
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  391  		return -ENOMEM;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  392  
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  393  	for (i = 0; i < pmic->common_irq_size; ++i) {
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  394  		irq_type = &pmic->common_irq_types[i];
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  395  		irq = platform_get_irq_byname(pdev, irq_type->irq_name);
d46f737208a45d Yang Li           2022-08-25  396  		if (irq < 0)
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  397  			return -EINVAL;
d46f737208a45d Yang Li           2022-08-25  398  
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  399  		irq_data[i].dev = tps->dev;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  400  		irq_data[i].type = irq_type;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  401  		error = devm_request_threaded_irq(tps->dev, irq, NULL,
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  402  						  tps65219_regulator_irq_handler,
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  403  						  IRQF_ONESHOT,
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  404  						  irq_type->irq_name,
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  405  						  &irq_data[i]);
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  406  		if (error)
38c9f98db20a64 Shree Ramamoorthy 2025-04-25 @407  			return dev_err_probe(tps->dev, PTR_ERR(rdev),
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  408  					     "Failed to request %s IRQ %d: %d\n",
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  409  					     irq_type->irq_name, irq, error);
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  410  	}
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  411  
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  412  	irq_data = devm_kmalloc(tps->dev, pmic->dev_irq_size, GFP_KERNEL);
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  413  	if (!irq_data)
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  414  		return -ENOMEM;
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  415  
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  416  	for (i = 0; i < pmic->dev_irq_size; ++i) {
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  417  		irq_type = &pmic->irq_types[i];
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  418  		irq = platform_get_irq_byname(pdev, irq_type->irq_name);
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  419  		if (irq < 0)
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  420  			return -EINVAL;
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  421  
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  422  		irq_data[i].dev = tps->dev;
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  423  		irq_data[i].type = irq_type;
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  424  		error = devm_request_threaded_irq(tps->dev, irq, NULL,
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  425  						  tps65219_regulator_irq_handler,
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  426  						  IRQF_ONESHOT,
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  427  						  irq_type->irq_name,
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  428  						  &irq_data[i]);
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  429  		if (error)
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  430  			return dev_err_probe(tps->dev, PTR_ERR(rdev),
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  431  					     "Failed to request %s IRQ %d: %d\n",
38c9f98db20a64 Shree Ramamoorthy 2025-04-25  432  					     irq_type->irq_name, irq, error);
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  433  	}
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  434  
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  435  	return 0;
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  436  }
c12ac5fc3e0af2 Jerome Neanne     2022-08-05  437  

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

                 reply	other threads:[~2025-05-09 22:07 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=202505100652.RkAzg3df-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.