Skip to content

Commit

Permalink
usbcore: fix incorrect type in assignment in descriptors_changed()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xenia Ragiadakou authored and Greg Kroah-Hartman committed Aug 31, 2013
1 parent e3376d6 commit b9a1048
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b9a1048

Please sign in to comment.