From: Xinsheng Zhu <xinsheng.zhu.ny@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check
Date: Mon, 28 Sep 2026 15:21:19 -0400 [thread overview]
Message-ID: <20260928192119.73351-1-xinsheng.zhu.ny@gmail.com> (raw)
Short-read handling was added to asix_read_cmd() by commit
920a9fa27e78 ("net: asix: add proper error handling of usb read errors").
The helper converts short reads to -ENODATA while preserving negative
errors from the underlying USB read operation.
Remove the redundant short-read check in asix_read_phy_addr()
and its unreachable -EIO assignment. The existing negative-return check
handles both short reads and underlying USB read errors.
Signed-off-by: Xinsheng Zhu <xinsheng.zhu.ny@gmail.com>
---
drivers/net/usb/asix_common.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 4f03f4e57655..51bf887e3520 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -327,11 +327,6 @@ int asix_read_phy_addr(struct usbnet *dev, bool internal)
if (ret < 0)
goto error;
- if (ret < 2) {
- ret = -EIO;
- goto error;
- }
-
offset = (internal ? 1 : 0);
ret = buf[offset];
base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d
--
2.54.0 (Apple Git-157)
next reply other threads:[~2026-09-28 19:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 19:21 Xinsheng Zhu [this message]
2026-10-01 13:57 ` [PATCH net-next] net: usb: asix: remove redundant PHY address short-read check Simon Horman
2026-10-02 0:30 ` patchwork-bot+netdevbpf
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=20260928192119.73351-1-xinsheng.zhu.ny@gmail.com \
--to=xinsheng.zhu.ny@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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