DORMANTno replies

[PATCH net-next] net: usb: asix: remove redundant PHY address short-read check

From: Xinsheng Zhu <hidden>
Date: 2026-09-28 19:21:28
Also in: linux-usb, lkml
Subsystem: networking drivers, the rest, usb networking drivers · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
---
 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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help