Thread (3 messages) 3 messages, 2 authors, 2026-03-12

Re: [PATCH 1/1 net-next] net: usb: cdc-ether: unify error handling in probe

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-03-11 19:15:55
Also in: linux-usb, lkml

quoted hunk ↗ jump to hunk
@@ -288,16 +288,11 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
 	if (info->data != info->control) {
 		status = usb_driver_claim_interface(driver, info->data, dev);
 		if (status < 0)
-			return status;
+			goto bad_desc;
 bad_desc:
 	dev_info(&dev->udev->dev, "bad CDC descriptors\n");
-	return -ENODEV;
+	return status;
Always reporting "bad CDC descriptors" does not seem correct. Not
being able to claim the interface is probably some other sort of
problem.

It might be better to change the dev_dbg()s to dev_err()s, and drop
the dev_info() here. You can then add additional dev_err() before the
goto's you are adding.

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help