Skip to content
Commit 9d60af5c authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman
Browse files

i2c: mlxcpld: check correct size of maximum RECV_LEN packet



[ Upstream commit 59791128 ]

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarMichael Shych <michaelsh@mellanox.com>
Tested-by: default avatarMichael Shych <michaelsh@mellanox.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b460fc9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment