Hi Gerhard, kernel test robot noticed the following build warnings: [auto build test WARNING on andi-shyti/i2c/i2c-host] [also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus soc/for-next linus/master v6.10-rc1 next-20240531] [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/Gerhard-Engleder/i2c-keba-Add-KEBA-I2C-controller-support/20240602-040548 base: git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host patch link: https://lore.kernel.org/r/20240601192846.68146-3-gerhard%40engleder-embedded.com patch subject: [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support config: s390-randconfig-r062-20240603 (https://download.01.org/0day-ci/archive/20240603/202406030714.6PytC3El-lkp@xxxxxxxxx/config) compiler: s390-linux-gcc (GCC) 13.2.0 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/202406030714.6PytC3El-lkp@xxxxxxxxx/ cocci warnings: (new ones prefixed by >>) >> drivers/misc/keba/cp500.c:324:14-15: WARNING comparing pointer to 0 vim +324 drivers/misc/keba/cp500.c 313 314 static int cp500_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) 315 { 316 struct device *dev = &pci_dev->dev; 317 struct resource startup; 318 struct cp500 *cp500; 319 u32 cp500_vers; 320 char buf[64]; 321 int ret; 322 323 cp500 = devm_kzalloc(dev, sizeof(*cp500), GFP_KERNEL); > 324 if (cp500 == 0) 325 return -ENOMEM; 326 cp500->pci_dev = pci_dev; 327 cp500->sys_hwbase = pci_resource_start(pci_dev, CP500_SYS_BAR); 328 cp500->ecm_hwbase = pci_resource_start(pci_dev, CP500_ECM_BAR); 329 if (!cp500->sys_hwbase || !cp500->ecm_hwbase) 330 return -ENODEV; 331 332 if (CP500_IS_CP035(cp500)) 333 cp500->devs = &cp035_devices; 334 else if (CP500_IS_CP505(cp500)) 335 cp500->devs = &cp505_devices; 336 else if (CP500_IS_CP520(cp500)) 337 cp500->devs = &cp520_devices; 338 else 339 return -ENODEV; 340 341 ret = pci_enable_device(pci_dev); 342 if (ret) 343 return ret; 344 pci_set_master(pci_dev); 345 346 startup = *pci_resource_n(pci_dev, CP500_SYS_BAR); 347 startup.end = startup.start + cp500->devs->startup.size - 1; 348 cp500->system_startup_addr = devm_ioremap_resource(&pci_dev->dev, 349 &startup); 350 if (IS_ERR(cp500->system_startup_addr)) { 351 ret = PTR_ERR(cp500->system_startup_addr); 352 goto out_disable; 353 } 354 355 cp500->msix_num = pci_alloc_irq_vectors(pci_dev, CP500_NUM_MSIX_NO_MMI, 356 CP500_NUM_MSIX, PCI_IRQ_MSIX); 357 if (cp500->msix_num < CP500_NUM_MSIX_NO_MMI) { 358 dev_err(&pci_dev->dev, 359 "Hardware does not support enough MSI-X interrupts\n"); 360 ret = -ENODEV; 361 goto out_disable; 362 } 363 364 cp500_vers = ioread32(cp500->system_startup_addr + CP500_VERSION_REG); 365 cp500->version.major = (cp500_vers & 0xff); 366 cp500->version.minor = (cp500_vers >> 8) & 0xff; 367 cp500->version.build = (cp500_vers >> 16) & 0xffff; 368 cp500_get_fpga_version(cp500, buf, sizeof(buf)); 369 370 dev_info(&pci_dev->dev, "FPGA version %s", buf); 371 372 pci_set_drvdata(pci_dev, cp500); 373 374 ret = sysfs_create_group(&pci_dev->dev.kobj, &attrs_group); 375 if (ret != 0) 376 goto out_free_irq; 377 378 ret = cp500_enable(cp500); 379 if (ret != 0) 380 goto out_remove_group; 381 382 cp500_register_platform_devs(cp500); 383 384 return 0; 385 386 out_remove_group: 387 sysfs_remove_group(&pci_dev->dev.kobj, &attrs_group); 388 out_free_irq: 389 pci_free_irq_vectors(pci_dev); 390 out_disable: 391 pci_clear_master(pci_dev); 392 pci_disable_device(pci_dev); 393 394 return ret; 395 } 396 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki