[soc:board-remove 171/217] drivers/mfd/tc3589x.c:335:24: error: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast

kernel test robot <[email protected]>
Newsgroups 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:   057394422bc04420585b2790b230d8a1f350ace8
commit: 9220687cca8bad538843ff5a1a062b10e008e238 [171/217] mfd: tc3589x: remove pdata based probing
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260818/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/[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/mfd/tc3589x.c: In function 'tc3589x_of_probe':
>> drivers/mfd/tc3589x.c:335:24: error: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
     335 |                 return ERR_PTR(-ENODEV);
         |                        ^~~~~~~~~~~~~~~~
   drivers/mfd/tc3589x.c: In function 'tc3589x_probe':
   drivers/mfd/tc3589x.c:351:37: warning: unused variable 'id' [-Wunused-variable]
     351 |         const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
         |                                     ^~


vim +335 drivers/mfd/tc3589x.c

a381b13e2aa064 Linus Walleij       2014-01-23  324  
9220687cca8bad Arnd Bergmann       2026-08-07  325  static int
9220687cca8bad Arnd Bergmann       2026-08-07  326  tc3589x_of_probe(struct device *dev, enum tc3589x_version *version,
9220687cca8bad Arnd Bergmann       2026-08-07  327  		 unsigned int *block)
a435ae1d51e2f1 Lee Jones           2012-09-07  328  {
a381b13e2aa064 Linus Walleij       2014-01-23  329  	struct device_node *np = dev->of_node;
a435ae1d51e2f1 Lee Jones           2012-09-07  330  	struct device_node *child;
a381b13e2aa064 Linus Walleij       2014-01-23  331  	const struct of_device_id *of_id;
a381b13e2aa064 Linus Walleij       2014-01-23  332  
a381b13e2aa064 Linus Walleij       2014-01-23  333  	of_id = of_match_device(tc3589x_match, dev);
a381b13e2aa064 Linus Walleij       2014-01-23  334  	if (!of_id)
a381b13e2aa064 Linus Walleij       2014-01-23 @335  		return ERR_PTR(-ENODEV);
a2ce000265b780 Krzysztof Kozlowski 2023-08-10  336  	*version = (uintptr_t) of_id->data;
a435ae1d51e2f1 Lee Jones           2012-09-07  337  
9220687cca8bad Arnd Bergmann       2026-08-07  338  	*block = 0;
a435ae1d51e2f1 Lee Jones           2012-09-07  339  	for_each_child_of_node(np, child) {
a381b13e2aa064 Linus Walleij       2014-01-23  340  		if (of_device_is_compatible(child, "toshiba,tc3589x-gpio"))
9220687cca8bad Arnd Bergmann       2026-08-07  341  			*block |= TC3589x_BLOCK_GPIO;
a381b13e2aa064 Linus Walleij       2014-01-23  342  		if (of_device_is_compatible(child, "toshiba,tc3589x-keypad"))
9220687cca8bad Arnd Bergmann       2026-08-07  343  			*block |= TC3589x_BLOCK_KEYPAD;
a435ae1d51e2f1 Lee Jones           2012-09-07  344  	}
a435ae1d51e2f1 Lee Jones           2012-09-07  345  
9220687cca8bad Arnd Bergmann       2026-08-07  346  	return 0;
a381b13e2aa064 Linus Walleij       2014-01-23  347  }
a435ae1d51e2f1 Lee Jones           2012-09-07  348  

:::::: The code at line 335 was first introduced by commit
:::::: a381b13e2aa064122325de9deaec51d6e4765ad7 mfd: tc3589x: Reform device tree probing

:::::: TO: Linus Walleij <[email protected]>
:::::: CC: Lee Jones <[email protected]>

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