From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Siqi Chen <chensiqi@uniontech.com>
Cc: "Anshul Dalal" <anshulusr@gmail.com>,
"Thomas Weißschuh" <linux@weissschuh.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: adafruit-seesaw - check i2c_transfer() return value
Date: Mon, 23 Nov 2026 22:14:48 -0800 [thread overview]
Message-ID: <awUrVOJjlHUrDXUD@google.com> (raw)
In-Reply-To: <20261124054344.1067234-1-chensiqi@uniontech.com>
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@uniontech.com>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2026-11-24 6:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 5:43 [PATCH] Input: adafruit-seesaw - check i2c_transfer() return value Siqi Chen
2026-11-24 6:14 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awUrVOJjlHUrDXUD@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=anshulusr@gmail.com \
--cc=chensiqi@uniontech.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.