Netdev List
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, manuelebner@mailbox.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCHv3 net-next 8/9] net: usb: usbnet: remove outdated sanity check
Date: Tue, 14 Jul 2026 13:44:28 +0200	[thread overview]
Message-ID: <20260714114429.1073434-8-oneukum@suse.com> (raw)
In-Reply-To: <20260714114429.1073434-1-oneukum@suse.com>

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


  parent reply	other threads:[~2026-07-14 11:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 11:44 [PATCHv3 net-next 1/9] net: usb: move updating filter and status from cdc drivers to usbnet Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 2/9] net: usb: centralize usbnet_cdc_zte_rx_fixup in usbnet Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 3/9] net: usb: usbnet: add cdc_state to struct usbnet Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 4/9] net: usb: use cdc_state in " Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 5/9] net: usb: int51x1: drop dependency on cdc_ether Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 6/9] net: usb: move exported symbols from cdc_ether to usbnet Oliver Neukum
2026-07-14 11:44 ` [PATCHv3 net-next 7/9] net: usb: remove dependencies on cdc_ether Oliver Neukum
2026-07-14 11:44 ` Oliver Neukum [this message]
2026-07-14 11:44 ` [PATCHv3 net-next 9/9] net: usb: usbnet: corrections in the comments 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=20260714114429.1073434-8-oneukum@suse.com \
    --to=oneukum@suse.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manuelebner@mailbox.org \
    --cc=netdev@vger.kernel.org \
    --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