Hi Lars,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8d3ae59288f1e7d58d76558a6ee96d533bc5019f]

url:    
https://github.com/intel-lab-lkp/linux/commits/Lars-Rask/drm-sitronix-st7571-spi-Add-support-for-ST75156-controller/20261022-173105
base:   8d3ae59288f1e7d58d76558a6ee96d533bc5019f
patch link:    
https://lore.kernel.org/r/20261022-add_st75156_support-v1-1-582525a39a39%40axis.com
patch subject: [PATCH 1/2] drm/sitronix/st7571-spi: Add support for ST75156 
controller
config: i386-buildonly-randconfig-1001-20261023 
(https://download.01.org/0day-ci/archive/20261023/[email protected]/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project 
ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20261023/[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 warnings (new ones prefixed by >>):

>> drivers/gpu/drm/sitronix/st7571-spi.c:121:43: warning: variable 'regmap' is 
>> uninitialized when used here [-Wuninitialized]
     121 |                 return dev_err_probe(&spi->dev, PTR_ERR(regmap),
         |                                                         ^~~~~~
   drivers/gpu/drm/sitronix/st7571-spi.c:116:23: note: initialize the variable 
'regmap' to silence this warning
     116 |         struct regmap *regmap;
         |                              ^
         |                               = NULL
   1 warning generated.


vim +/regmap +121 drivers/gpu/drm/sitronix/st7571-spi.c

   112  
   113  static int st7571_spi_probe(struct spi_device *spi)
   114  {
   115          struct st7571_device *st7571;
   116          struct regmap *regmap;
   117          struct spi_device_data *spi_data;
   118  
   119          spi_data = devm_kzalloc(&spi->dev, sizeof(*spi_data), 
GFP_KERNEL);
   120          if (IS_ERR(spi_data))
 > 121                  return dev_err_probe(&spi->dev, PTR_ERR(regmap),
   122                                       "Failed to initialize spi data\n");
   123  
   124          spi_data->spi = spi;
   125          spi_data->dc_gpio = devm_gpiod_get(&spi->dev, "dc", 
GPIOD_OUT_LOW);
   126  
   127          if (IS_ERR(spi_data->dc_gpio))
   128                  /* init regmap for 3 line SPI */
   129                  regmap = devm_regmap_init_spi(spi, 
&st7571_spi_regmap_config);
   130          else
   131                  /* init regmap for 4 line SPI */
   132                  regmap = devm_regmap_init(&spi->dev, &regmap_spi_dc_bus,
   133                                            spi_data, 
&st7571_spi_regmap_config);
   134  
   135          if (IS_ERR(regmap))
   136                  return dev_err_probe(&spi->dev, PTR_ERR(regmap),
   137                                       "Failed to initialize regmap\n");
   138  
   139          st7571 = st7571_probe(&spi->dev, regmap);
   140          if (IS_ERR(st7571))
   141                  return dev_err_probe(&spi->dev, PTR_ERR(st7571),
   142                                       "Failed to initialize regmap\n");
   143  
   144          st7571->spi_data = spi_data;
   145          spi_set_drvdata(spi, st7571);
   146  
   147          return 0;
   148  }
   149  

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

Reply via email to