[soc:board-remove 137/200] drivers/mfd/max8925-i2c.c:175:28: warning: variable 'tsc_irq' is uninitialized when used here

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all,org.infradead.lists.linux-arm-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git board-remove
head:   c12d647b0229f4d75a2973c9b4e79f9b53406426
commit: cdd7cbf79d6c020c83a34985cae63f91f8f8a4c9 [137/200] mfd: max8925: remove platform data probing
config: i386-randconfig-016-20260819 (https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/[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/mfd/max8925-i2c.c:175:28: warning: variable 'tsc_irq' is uninitialized when used here [-Wuninitialized]
     175 |         max8925_device_init(chip, tsc_irq);
         |                                   ^~~~~~~
   drivers/mfd/max8925-i2c.c:138:13: note: initialize the variable 'tsc_irq' to silence this warning
     138 |         int tsc_irq;
         |                    ^
         |                     = 0
   1 warning generated.


vim +/tsc_irq +175 drivers/mfd/max8925-i2c.c

   133	
   134	static int max8925_probe(struct i2c_client *client)
   135	{
   136		struct max8925_chip *chip;
   137		struct device_node *node = client->dev.of_node;
   138		int tsc_irq;
   139		int ret;
   140	
   141		chip = devm_kzalloc(&client->dev,
   142				    sizeof(struct max8925_chip), GFP_KERNEL);
   143		if (chip == NULL)
   144			return -ENOMEM;
   145	
   146		/* parse DT to get platform data */
   147		ret = of_property_read_u32(node, "maxim,tsc-irq", &chip->tsc_irq);
   148		if (ret) {
   149			dev_err(&client->dev, "Not found maxim,tsc-irq property\n");
   150			return -EINVAL;
   151		}
   152	
   153		chip->i2c = client;
   154		chip->dev = &client->dev;
   155		i2c_set_clientdata(client, chip);
   156		mutex_init(&chip->io_lock);
   157	
   158		chip->rtc = i2c_new_dummy_device(chip->i2c->adapter, RTC_I2C_ADDR);
   159		if (IS_ERR(chip->rtc)) {
   160			dev_err(chip->dev, "Failed to allocate I2C device for RTC\n");
   161			return PTR_ERR(chip->rtc);
   162		}
   163		i2c_set_clientdata(chip->rtc, chip);
   164	
   165		chip->adc = i2c_new_dummy_device(chip->i2c->adapter, ADC_I2C_ADDR);
   166		if (IS_ERR(chip->adc)) {
   167			dev_err(chip->dev, "Failed to allocate I2C device for ADC\n");
   168			i2c_unregister_device(chip->rtc);
   169			return PTR_ERR(chip->adc);
   170		}
   171		i2c_set_clientdata(chip->adc, chip);
   172	
   173		device_init_wakeup(&client->dev, 1);
   174	
 > 175		max8925_device_init(chip, tsc_irq);
   176	
   177		return 0;
   178	}
   179	

--
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.