summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-05-11 11:36:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-17 11:27:41 +0200
commitdd5ca753fa92fb736b1395db892bd29f78e6d408 (patch)
tree38c687d8b5732db3d811ddc33cc3d2201581f529 /drivers/usb/misc
parent63afd5cc78775018ea2dec4004428dafa5283e93 (diff)
downloadlinux-dd5ca753fa92fb736b1395db892bd29f78e6d408.tar.bz2
USB: iowarrior: fix info ioctl on big-endian hosts
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.") Cc: stable <stable@vger.kernel.org> # 2.6.21 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/iowarrior.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 77569531b78a..83b05a287b0c 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,
info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice);
/* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */
- info.speed = le16_to_cpu(dev->udev->speed);
+ info.speed = dev->udev->speed;
info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber;
info.report_size = dev->report_size;