Thread (16 messages) 16 messages, 4 authors, 2d ago

[PATCHv2 net-next 7/7] net: usb: usbnet: remove outdated sanity check

From: Oliver Neukum <oneukum@suse.com>
Date: 2026-07-09 12:01:47
Also in: linux-usb, lkml
Subsystem: networking drivers, the rest, usb "usbnet" driver framework, usb networking drivers · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Oliver Neukum

The cdc state is now included as a proper member in the descriptor.
There is no point in checking whether it fits into the scratchpad
area. Just remove the check.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---

v2:

- added to address concern about maintainability

 drivers/net/usb/usbnet.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index ce932c81382e..0347f6887222 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -2457,9 +2457,6 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
 	struct usb_driver		*driver = driver_of(intf);
 	struct usb_cdc_parsed_header header;
 
-	if (sizeof(dev->data) < sizeof(*info))
-		return -EDOM;
-
 	/* expect strict spec conformance for the descriptors, but
 	 * cope with firmware which stores them in the wrong place
 	 */
-- 
2.54.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help