From: sashiko-bot@kernel.org
To: "Siqi Chen" <chensiqi@uniontech.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: misc: onboard_usb_dev: check i2c_transfer() return values
Date: Tue, 01 Dec 2026 02:21:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-242365@kernel.org> (raw)
In-Reply-To: <20261201021736.2748309-1-chensiqi@uniontech.com>
> i2c_transfer() returns the number of messages transferred or a negative
> error code. The USB5744 I2C helpers only check for negative errors and
> therefore treat short transfers as successful.
>
> In particular, if the two-message read completes only the register
> address write, the driver consumes uninitialized data from rd_buf and
> uses it in a read-modify-write operation.
>
> Require every transfer to complete the expected number of messages,
> preserve negative error codes, and return -EIO for short transfers.
>
> Fixes: 1143d41922c0 ("usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence")
> Signed-off-by: Siqi Chen <chensiqi@uniontech.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201021736.2748309-1-chensiqi@uniontech.com?part=1
prev parent reply other threads:[~2026-12-01 2:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 2:25 [PATCH] usb: misc: onboard_usb_dev: check i2c_transfer() return values Siqi Chen
2026-11-24 2:31 ` sashiko-bot
2026-11-26 7:53 ` Pandey, Radhey Shyam
2026-12-01 2:17 ` [PATCH v2] " Siqi Chen
2026-12-01 2:21 ` sashiko-bot [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=sashiko-outbox-242365@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chensiqi@uniontech.com \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox