Patch "Input: ili210x - fix ili251x_read_touch_data() return value" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Input: ili210x - fix ili251x_read_touch_data() return value

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-ili210x-fix-ili251x_read_touch_data-return-val.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5cc1fa810617c2d833a2361bc7e00843bb3e4e93
Author: John Keeping <jkeeping@xxxxxxxxxxxxxxxxx>
Date:   Thu May 23 09:56:24 2024 +0100

    Input: ili210x - fix ili251x_read_touch_data() return value
    
    [ Upstream commit 9f0fad0382124e7e23b3c730fa78818c22c89c0a ]
    
    The caller of this function treats all non-zero values as an error, so
    the return value of i2c_master_recv() cannot be returned directly.
    
    This fixes touch reporting when there are more than 6 active touches.
    
    Fixes: ef536abd3afd1 ("Input: ili210x - define and use chip operations structure")
    Signed-off-by: John Keeping <jkeeping@xxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240523085624.2295988-1-jkeeping@xxxxxxxxxxxxxxxxx
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index 31ffdc2a93f35..79bdb2b109496 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -261,8 +261,8 @@ static int ili251x_read_touch_data(struct i2c_client *client, u8 *data)
 	if (!error && data[0] == 2) {
 		error = i2c_master_recv(client, data + ILI251X_DATA_SIZE1,
 					ILI251X_DATA_SIZE2);
-		if (error >= 0 && error != ILI251X_DATA_SIZE2)
-			error = -EIO;
+		if (error >= 0)
+			error = error == ILI251X_DATA_SIZE2 ? 0 : -EIO;
 	}
 
 	return error;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux