Re: [PATCH v3 2/6] mfd: pf1550: add core mfd driver

Dan Carpenter
2025-06-02T06:08:33Z

Hi Samuel,

kernel test robot noticed the following build warnings:

url: https://github.com/intel-lab-lkp/linux/commits/Samuel-Kayode-via-B4-Relay/dt-bindings-mfd-add-pf1550/20250528-062840
base: 0a4b866d08c6adaea2f4592d31edac6deeb4dcbd
patch link: https://lore.kernel.org/r/20250527-pf1550-v3-2-45f69453cd51%40savoirfairelinux.com
patch subject: [PATCH v3 2/6] mfd: pf1550: add core mfd driver
config: nios2-randconfig-r072-20250529 (https://download.01.org/0day-ci/archive/20250529/202505290859.CKZrTkZu-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 10.5.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@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202505290859.CKZrTkZu-lkp@intel.com/

smatch warnings:
drivers/mfd/pf1550.c:162 pf1550_i2c_probe() warn: passing zero to 'dev_err_probe'

vim +/dev_err_probe +162 drivers/mfd/pf1550.c

fc62e32ad9eb64 Samuel Kayode 2025-05-27 140 static int pf1550_i2c_probe(struct i2c_client *i2c)
fc62e32ad9eb64 Samuel Kayode 2025-05-27 141 {
fc62e32ad9eb64 Samuel Kayode 2025-05-27 142 struct pf1550_dev *pf1550;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 143 unsigned int reg_data = 0;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 144 int ret = 0;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 145
fc62e32ad9eb64 Samuel Kayode 2025-05-27 146 pf1550 = devm_kzalloc(&i2c->dev, sizeof(*pf1550), GFP_KERNEL);
fc62e32ad9eb64 Samuel Kayode 2025-05-27 147 if (!pf1550)
fc62e32ad9eb64 Samuel Kayode 2025-05-27 148 return -ENOMEM;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 149
fc62e32ad9eb64 Samuel Kayode 2025-05-27 150 i2c_set_clientdata(i2c, pf1550);
fc62e32ad9eb64 Samuel Kayode 2025-05-27 151 pf1550->dev = &i2c->dev;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 152 pf1550->i2c = i2c;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 153 pf1550->irq = i2c->irq;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 154
fc62e32ad9eb64 Samuel Kayode 2025-05-27 155 pf1550->regmap = devm_regmap_init_i2c(i2c, &pf1550_regmap_config);
fc62e32ad9eb64 Samuel Kayode 2025-05-27 156 if (IS_ERR(pf1550->regmap))
fc62e32ad9eb64 Samuel Kayode 2025-05-27 157 return dev_err_probe(pf1550->dev, PTR_ERR(pf1550->regmap),
fc62e32ad9eb64 Samuel Kayode 2025-05-27 158 "failed to allocate register map\n");
fc62e32ad9eb64 Samuel Kayode 2025-05-27 159
fc62e32ad9eb64 Samuel Kayode 2025-05-27 160 ret = regmap_read(pf1550->regmap, PF1550_PMIC_REG_DEVICE_ID, &reg_data);
fc62e32ad9eb64 Samuel Kayode 2025-05-27 161 if (ret < 0 || reg_data != PF1550_DEVICE_ID)
fc62e32ad9eb64 Samuel Kayode 2025-05-27 @162 return dev_err_probe(pf1550->dev, ret, "device not found!\n");

return dev_err_probe(pf1550->dev, ret ?: -EINVAL, "device not found!\n");

fc62e32ad9eb64 Samuel Kayode 2025-05-27 163
fc62e32ad9eb64 Samuel Kayode 2025-05-27 164 pf1550->type = PF1550;
fc62e32ad9eb64 Samuel Kayode 2025-05-27 165
fc62e32ad9eb64 Samuel Kayode 2025-05-27 166 ret = devm_regmap_add_irq_chip(pf1550->dev, pf1550->regmap,
fc62e32ad9eb64 Samuel Kayode 2025-05-27 167 pf1550->irq,
fc62e32ad9eb64 Samuel Kayode 2025-05-27 168 IRQF_ONESHOT | IRQF_SHARED |
fc62e32ad9eb64 Samuel Kayode 2025-05-27 169 IRQF_TRIGGER_FALLING, 0,
fc62e32ad9eb64 Samuel Kayode 2025-05-27 170 &pf1550_regulator_irq_chip,
fc62e32ad9eb64 Samuel Kayode 2025-05-27 171 &pf1550->irq_data_regulator);
fc62e32ad9eb64 Samuel Kayode 2025-05-27 172 if (ret)

--
0-DAY CI Kernel Test Service