tree: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master head: a5d2ee08adc1d98647679c4e4c73223464d5d936 commit: 52d2af10759262ab95162ddc1a56faa8fe3aabde [78/83] Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name() config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20250110/202501102245.kuCKXaOP-lkp@xxxxxxxxx/config) compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501102245.kuCKXaOP-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/202501102245.kuCKXaOP-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> drivers/bluetooth/btbcm.c:557:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion] return -ENOMEM; ^~~~~~~ 1 error generated. vim +557 drivers/bluetooth/btbcm.c 536 537 /* 538 * This currently only looks up the device tree board appendix, 539 * but can be expanded to other mechanisms. 540 */ 541 static const char *btbcm_get_board_name(struct device *dev) 542 { 543 #ifdef CONFIG_OF 544 struct device_node *root __free(device_node) = of_find_node_by_path("/"); 545 char *board_type; 546 const char *tmp; 547 548 if (!root) 549 return NULL; 550 551 if (of_property_read_string_index(root, "compatible", 0, &tmp)) 552 return NULL; 553 554 /* get rid of any '/' in the compatible string */ 555 board_type = devm_kstrdup(dev, tmp, GFP_KERNEL); 556 if (!board_type) > 557 return -ENOMEM; 558 559 strreplace(board_type, '/', '-'); 560 561 return board_type; 562 #else 563 return NULL; 564 #endif 565 } 566 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki