i2c: mlxcpld: check correct size of maximum RECV_LEN packet
I2C_SMBUS_BLOCK_MAX defines already the maximum number as defined in the SMBus 2.0 specs. I don't see a reason to add 1 here. Also, fix the errno to what is suggested for this error. Fixes: c9bfdc7c ("i2c: mlxcpld: Add support for smbus block read transaction") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NMichael Shych <michaelsh@mellanox.com> Tested-by: NMichael Shych <michaelsh@mellanox.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
Showing
想要评论请 注册 或 登录