diff options
author | Johan Hovold <johan@kernel.org> | 2017-05-11 05:36:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-25 09:44:40 -0400 |
commit | ee0f3a89842ea7adab3f42d08d98f77f13fa0357 (patch) | |
tree | e0ec304ef712531efb7c6353134c76e25f51473d /drivers | |
parent | dbb127332abf38e6df266b9cabee7d73ef6ea6da (diff) |
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: 946b960d13c1 ("USB: add driver for iowarrior devices.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 37c63cb39714..0ef29d202263 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -554,7 +554,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd, | |||
554 | info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice); | 554 | info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice); |
555 | 555 | ||
556 | /* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */ | 556 | /* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */ |
557 | info.speed = le16_to_cpu(dev->udev->speed); | 557 | info.speed = dev->udev->speed; |
558 | info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber; | 558 | info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber; |
559 | info.report_size = dev->report_size; | 559 | info.report_size = dev->report_size; |
560 | 560 | ||