usbcore: fix read of usbdevfs_ctrltransfer fields in proc_control()
authorXenia Ragiadakou <burzalodowa@gmail.com>
Sat, 31 Aug 2013 15:09:14 +0000 (18:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 16:49:24 +0000 (09:49 -0700)
Urb fields are stored in struct usbdevfs_ctrltransfer in CPU byteorder
and not in little endian, so there is no need to be converted.
This bug was reported by sparse.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c

index 737e3c19967bee3e81f57cc041ec9989ec38fb57..f4f2300f8e1050a4dc74cf4e80b18dfaeee1b4f1 100644 (file)
@@ -898,10 +898,8 @@ static int proc_control(struct dev_state *ps, void __user *arg)
        snoop(&dev->dev, "control urb: bRequestType=%02x "
                "bRequest=%02x wValue=%04x "
                "wIndex=%04x wLength=%04x\n",
-               ctrl.bRequestType, ctrl.bRequest,
-               __le16_to_cpup(&ctrl.wValue),
-               __le16_to_cpup(&ctrl.wIndex),
-               __le16_to_cpup(&ctrl.wLength));
+               ctrl.bRequestType, ctrl.bRequest, ctrl.wValue,
+               ctrl.wIndex, ctrl.wLength);
        if (ctrl.bRequestType & 0x80) {
                if (ctrl.wLength && !access_ok(VERIFY_WRITE, ctrl.data,
                                               ctrl.wLength)) {