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

From: Andrew Lunn

Date: Wed Mar 11 2026 - 15:16:02 EST


> @@ -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