Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3779a6c 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 597911287fcd13c3a4b4aa3e0a52b33d431e0a8e ]

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 c6b239e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment