Re: [PATCH v2] leds: lp5860: fix LED teardown ordering using devm_add_action_or_reset()

kernel test robot <[email protected]>
Newsgroups org.kernel.vger.linux-leds,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v7.2]
[cannot apply to lee-leds/for-leds-next next-20260819]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/kr494167-gmail-com/leds-lp5860-fix-LED-teardown-ordering-using-devm_add_action_or_reset/20260806-202527
base:   linus/master
patch link:    https://lore.kernel.org/r/20260806145527.114844-1-kr494167%40gmail.com
patch subject: [PATCH v2] leds: lp5860: fix LED teardown ordering using devm_add_action_or_reset()
config: sparc64-randconfig-r071-20260820 (https://download.01.org/0day-ci/archive/20260820/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 844a18e753e822736c9805ab779144b647a2c186)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/[email protected]/reproduce)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/leds/rgb/leds-lp5860-spi.c:64:2: error: use of undeclared identifier 'ret'
      64 |         ret = devm_mutex_init(dev, &lp5860->lock);
         |         ^~~
   drivers/leds/rgb/leds-lp5860-spi.c:65:6: error: use of undeclared identifier 'ret'
      65 |         if (ret)
         |             ^~~
   drivers/leds/rgb/leds-lp5860-spi.c:65:6: error: use of undeclared identifier 'ret'
      65 |         if (ret)
         |             ^~~
   drivers/leds/rgb/leds-lp5860-spi.c:65:6: error: use of undeclared identifier 'ret'
      65 |         if (ret)
         |             ^~~
   drivers/leds/rgb/leds-lp5860-spi.c:66:10: error: use of undeclared identifier 'ret'
      66 |                 return ret;
         |                        ^~~
   5 errors generated.


vim +/ret +64 drivers/leds/rgb/leds-lp5860-spi.c

    35	
    36	static int lp5860_probe(struct spi_device *spi)
    37	{
    38		struct device *dev = &spi->dev;
    39		struct lp5860 *lp5860;
    40		unsigned int multi_leds;
    41	
    42		multi_leds = device_get_child_node_count(dev);
    43		if (!multi_leds) {
    44			dev_err(dev, "LEDs are not defined in Device Tree!");
    45			return -ENODEV;
    46		}
    47	
    48		if (multi_leds > LP5860_MAX_LED) {
    49			dev_err(dev, "Too many LEDs specified.\n");
    50			return -EINVAL;
    51		}
    52	
    53		lp5860 = devm_kzalloc(dev, struct_size(lp5860, leds, multi_leds),
    54				      GFP_KERNEL);
    55		if (!lp5860)
    56			return -ENOMEM;
    57	
    58		lp5860->regmap = devm_regmap_init_spi(spi, &lp5860_regmap_config);
    59		if (IS_ERR(lp5860->regmap))
    60			return dev_err_probe(&spi->dev, PTR_ERR(lp5860->regmap),
    61					     "Failed to initialise Regmap.\n");
    62	
    63		lp5860->dev = dev;
  > 64		ret = devm_mutex_init(dev, &lp5860->lock);
    65		if (ret)
    66			return ret;
    67	
    68		spi_set_drvdata(spi, lp5860);
    69	
    70		return lp5860_device_init(dev);
    71	}
    72	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.