Re: [PATCH] Input: adafruit-seesaw - check i2c_transfer() return value

From: Dmitry Torokhov

Date: Tue Nov 24 2026 - 01:14:57 EST


On Tue, Nov 24, 2026 at 01:43:44PM +0800, Siqi Chen wrote:
> i2c_transfer() returns the number of messages transferred or a negative
> error code. The seesaw register read helper only checks for negative
> errors and therefore treats short transfers as successful.
>
> If only the register-address message is transferred, callers consume
> data that was not read from the device. This can result in bogus button
> or axis events.
>
> Require both messages to be transferred, preserve negative error codes,
> and return -EIO for a short transfer.
>
> Fixes: 52c4e5985a73 ("Input: driver for Adafruit Seesaw Gamepad")
> Signed-off-by: Siqi Chen <chensiqi@xxxxxxxxxxxxx>

Applied, thank you.

--
Dmitry