mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oliver Neukum <oneukum@suse.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1 net-next] net: usb: cdc-ether: unify error handling in probe
Date: Wed, 11 Mar 2026 20:15:48 +0100	[thread overview]
Message-ID: <5db41b5a-c53f-4441-bf4e-a12add3e33b4@lunn.ch> (raw)
In-Reply-To: <20260311112919.678686-1-oneukum@suse.com>

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

  reply	other threads:[~2026-03-11 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 11:28 Oliver Neukum
2026-03-11 19:15 ` Andrew Lunn [this message]
2026-03-12  8:43   ` Oliver Neukum

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=5db41b5a-c53f-4441-bf4e-a12add3e33b4@lunn.ch \
    --to=andrew@lunn.ch \
    --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=oneukum@suse.com \
    --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

all inboxes | Powered by JetHome®