]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: mlxcpld: check correct size of maximum RECV_LEN packet
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sun, 28 Jun 2020 11:52:44 +0000 (13:52 +0200)
committerWolfram Sang <wsa@kernel.org>
Sat, 4 Jul 2020 06:20:38 +0000 (08:20 +0200)
commit862694c9fce499929f40e2090d58dab62ef1c575
tree70f04b578a42b89d8b860169cec92c804a13f30c
parent58c6f35bcba3d7c5c5a317b6d3da58c59342c7a7
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: ae6ef5cb5f7f ("i2c: mlxcpld: Add support for smbus block read transaction")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Michael Shych <michaelsh@mellanox.com>
Tested-by: Michael Shych <michaelsh@mellanox.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mlxcpld.c