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

From: kernel test robot

Date: Wed Aug 19 2026 - 17:00:41 EST


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-20260818]
[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: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260820/202608200410.1YCGXTpW-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/202608200410.1YCGXTpW-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608200410.1YCGXTpW-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/leds/rgb/leds-lp5860-spi.c: In function 'lp5860_probe':
>> drivers/leds/rgb/leds-lp5860-spi.c:64:9: error: 'ret' undeclared (first use in this function); did you mean 'net'?
64 | ret = devm_mutex_init(dev, &lp5860->lock);
| ^~~
| net
drivers/leds/rgb/leds-lp5860-spi.c:64:9: note: each undeclared identifier is reported only once for each function it appears in


vim +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