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-2-gerhard%40engleder-embedded.com patch subject: [PATCH 1/2] i2c: keba: Add KEBA I2C controller support config: s390-randconfig-r062-20240603 (https://download.01.org/0day-ci/archive/20240603/202406030504.QcIr6Qaw-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/202406030504.QcIr6Qaw-lkp@xxxxxxxxx/ cocci warnings: (new ones prefixed by >>) >> drivers/i2c/busses/i2c-keba.c:491:14-15: WARNING comparing pointer to 0 vim +491 drivers/i2c/busses/i2c-keba.c 480 481 static int ki2c_probe(struct platform_device *pdev) 482 { 483 struct i2c_keba_platform_data *pdata; 484 struct device *dev = &pdev->dev; 485 struct i2c_adapter *adap; 486 struct resource *io; 487 struct ki2c *ki2c; 488 int ret; 489 490 pdata = dev->platform_data; > 491 if (pdata == 0) { 492 dev_err(dev, "Platform data not found!\n"); 493 return -ENODEV; 494 } 495 496 ki2c = devm_kzalloc(dev, sizeof(*ki2c), GFP_KERNEL); 497 if (!ki2c) 498 return -ENOMEM; 499 ki2c->pdev = pdev; 500 ki2c->client = devm_kcalloc(dev, pdata->info_size, 501 sizeof(*ki2c->client), GFP_KERNEL); 502 if (!ki2c->client) 503 return -ENOMEM; 504 ki2c->client_size = pdata->info_size; 505 platform_set_drvdata(pdev, ki2c); 506 507 io = platform_get_resource(pdev, IORESOURCE_MEM, 0); 508 ki2c->base = devm_ioremap_resource(dev, io); 509 if (IS_ERR(ki2c->base)) 510 return PTR_ERR(ki2c->base); 511 512 /* enable controller */ 513 iowrite8(KI2C_CONTROL_MEN, ki2c->base + KI2C_CONTROL_REG); 514 515 adap = &ki2c->adapter; 516 strscpy(adap->name, "KEBA I2C adapter", sizeof(adap->name)); 517 adap->owner = THIS_MODULE; 518 adap->class = I2C_CLASS_HWMON; 519 adap->algo = &ki2c_algo; 520 adap->dev.parent = dev; 521 522 i2c_set_adapdata(adap, ki2c); 523 524 /* reset bus before probing I2C devices */ 525 ret = ki2c_reset_bus(ki2c); 526 if (ret) { 527 dev_err(dev, "Failed to reset bus (%d)!\n", ret); 528 goto out_disable; 529 } 530 531 ret = i2c_add_adapter(adap); 532 if (ret) { 533 dev_err(dev, "Failed to add adapter (%d)!\n", ret); 534 goto out_disable; 535 } 536 537 ret = ki2c_register_devices(ki2c, pdata); 538 if (ret) { 539 dev_err(dev, "Failed to register devices (%d)!\n", ret); 540 goto out_delete; 541 } 542 543 return 0; 544 545 out_delete: 546 i2c_del_adapter(adap); 547 out_disable: 548 iowrite8(0, ki2c->base + KI2C_CONTROL_REG); 549 return ret; 550 } 551 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki