usbcore: fix incorrect type in assignment in descriptors_changed()
authorXenia Ragiadakou <burzalodowa@gmail.com>
Sat, 31 Aug 2013 01:40:49 +0000 (04:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Aug 2013 01:50:43 +0000 (18:50 -0700)
This patch fixes the incorrect assignment of a variable with type 'le16'
to a variable with type 'unsigned int'.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c

index 3b7ca181cd721d1acaf872f8bd9e38ccf0a51891..dde4c83516a1870bd4ed7a11e3fe433ced0979af 100644 (file)
@@ -4962,10 +4962,10 @@ static int descriptors_changed(struct usb_device *udev,
        if ((old_bos && !udev->bos) || (!old_bos && udev->bos))
                return 1;
        if (udev->bos) {
-               len = udev->bos->desc->wTotalLength;
-               if (len != old_bos->desc->wTotalLength)
+               len = le16_to_cpu(udev->bos->desc->wTotalLength);
+               if (len != le16_to_cpu(old_bos->desc->wTotalLength))
                        return 1;
-               if (memcmp(udev->bos->desc, old_bos->desc, le16_to_cpu(len)))
+               if (memcmp(udev->bos->desc, old_bos->desc, len))
                        return 1;
        }