On Sat, Feb 2, 2019 at 10:30 PM Martin Kelly <martin@xxxxxxxxxxxxxxxx> wrote: > Jonathan Cameron pointed out that the check is for functions that return > 0 on success. Thus, the check should be either "if (ret != 0)" or "if > (ret)". Jonathan prefers "if (ret)", so I'm using that. By leaving it at > "if (ret < 0)", technically a function could return positive numbers and > not count as an error, which is a bug. I fail to see how regmap_read()/regmap_write() functions could return positive numbers on error.