]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commitac00fc3085e544570b256e8b15057247f2534f92
treeed77c71879184d87e6033ad73ca2a4e1e7a725f8
parent09c86577262d97a25050524e048d0ad5697979a7
i2c: mlxcpld: check correct size of maximum RECV_LEN packet

BugLink: https://bugs.launchpad.net/bugs/1886995
[ 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: c9bfdc7c16cb ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/i2c/busses/i2c-mlxcpld.c