Skip to content

Commit 319be2a

Browse files
jhovoldgregkh
authored andcommitted
USB: iowarrior: fix info ioctl on big-endian hosts
commit dd5ca753fa92fb736b1395db892bd29f78e6d408 upstream. Drop erroneous le16_to_cpu when returning the USB device speed which is already in host byte order. Found using sparse: warning: cast to restricted __le16 Fixes: 946b960 ("USB: add driver for iowarrior devices.") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1beae74 commit 319be2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/misc/iowarrior.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
557557
info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice);
558558

559559
/* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */
560-
info.speed = le16_to_cpu(dev->udev->speed);
560+
info.speed = dev->udev->speed;
561561
info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber;
562562
info.report_size = dev->report_size;
563563

0 commit comments

Comments
 (0)