Skip to contentSkip to conversation

mfd: PCF50633 core driver

DISCUSSION Dan Carpenter 1 participant 1 message Jan 6, 2016 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello Balaji Rao,

The patch f52046b14b1e: "mfd: PCF50633 core driver" from Jan 9, 2009, leads to the following static checker warning:

	drivers/mfd/pcf50633-core.c:224 pcf50633_probe()
	warn: 'pcf50633_reg_read(pcf, 0)()' returns unsigned values

drivers/mfd/pcf50633-core.c
221

   222          version = pcf50633_reg_read(pcf, 0);
                          ^^^^^^^^^^^^^^^^^^^^^^^^^

These return 0xFF on error, they don't return negative values.

   223          variant = pcf50633_reg_read(pcf, 1);
   224          if (version < 0 || variant < 0) {
   225                  dev_err(pcf->dev, "Unable to probe pcf50633\n");
   226                  ret = -ENODEV;
   227                  return ret;
   228          }
   229  

regards,
dan carpenter