aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2024-03-30 15:37:54 +0100
committerWolfram Sang <wsa+renesas@sang-engineering.com>2024-03-30 15:37:54 +0100
commit2953eb02875b42c96e5ecb2d1061d0a2c1f9972b (patch)
treec4e2e8b36ad6d04876ceb42ba9b552ab3c5b6435
parent4cece764965020c22cff7665b18a012006359095 (diff)
parentd1ef7a9ca867ab5c161d1647b2a8ec93a2ea155d (diff)
downloadlinux-2953eb02875b42c96e5ecb2d1061d0a2c1f9972b.tar.gz
Merge tag 'i2c-host-fixes-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
One fix in the i801 driver where a bug caused touchpad malfunctions on some Lenovo P1 models by incorrectly overwriting a status variable during successful SMBUS transactions.
-rw-r--r--drivers/i2c/busses/i2c-i801.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index a6861660cb8ca7..79870dd7a0146e 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -536,11 +536,12 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
if (read_write == I2C_SMBUS_READ ||
command == I2C_SMBUS_BLOCK_PROC_CALL) {
- status = i801_get_block_len(priv);
- if (status < 0)
+ len = i801_get_block_len(priv);
+ if (len < 0) {
+ status = len;
goto out;
+ }
- len = status;
data->block[0] = len;
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
for (i = 0; i < len; i++)