diff options
| author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2025-08-20 17:38:16 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-06 15:25:05 +0200 |
| commit | 970076537efd847c6f74ba9ed888b9cdbf71206e (patch) | |
| tree | bf3216e3e01e09568b4b9e916602fce788f5becd /drivers/usb/core | |
| parent | edede7a6dcd7435395cf757d053974aaab6ab1c2 (diff) | |
usb: core: Use le16_to_cpu() to read __le16 value in usb_parse_endpoint()
wMaxPacketSize field in struct usb_endpoint_descriptor is an __le16, use
le16_to_cpu() to read it.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250820143824.551777-2-sakari.ailus@linux.intel.com
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 42468bbeffd2..cda595b4014f 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -507,7 +507,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, } /* Parse a possible eUSB2 periodic endpoint companion descriptor */ - if (bcdUSB == 0x0220 && d->wMaxPacketSize == 0 && + if (bcdUSB == 0x0220 && !le16_to_cpu(d->wMaxPacketSize) && (usb_endpoint_xfer_isoc(d) || usb_endpoint_xfer_int(d))) usb_parse_eusb2_isoc_endpoint_companion(ddev, cfgno, inum, asnum, endpoint, buffer, size); |
