On Fri, Jul 10, 2026 at 12:20:45PM +0100, Rodrigo Alencar via B4 Relay wrote:
> Verify that the expected number of i2c messages were transferred when
> ad5686_i2c_read() is called. This issue exists since the support for I2C
> devices where first introduced.
...
> ret = i2c_transfer(i2c->adapter, msg, 2);
> - if (ret < 0)
> - return ret;
No need to touch this.
> + if (ret != 2)
> + return ret < 0 ? ret : -EIO;
Make it use standard pattern:
ret = i2c_transfer(i2c->adapter, msg, ARRAY_SIZE(msg));
if (ret < 0)
return ret;
if (ret != ARRAY_SIZE(msg))
return -EIO;
--
With Best Regards,
Andy Shevchenko