]> Pileus Git - ~andy/linux/commit
xhci: fix incorrect type in assignment in xhci_count_num_new_endpoints()
authorXenia Ragiadakou <burzalodowa@gmail.com>
Mon, 9 Sep 2013 18:03:06 +0000 (21:03 +0300)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 2 Dec 2013 20:59:47 +0000 (12:59 -0800)
commitef73400ca5d1ad695374988510b9977c41b81f3e
tree05a3a3a024babf8830f7666a895e70a70ac7d574
parent0d3703be3a671ca225a796f4ae6e904dd83c2e07
xhci: fix incorrect type in assignment in xhci_count_num_new_endpoints()

The fields 'add_flags' and 'drop_flags' in struct xhci_input_control_ctx
have type __le32 and need to be converted to CPU byteorder before being
used to derive the number of added endpoints.
This bug was found using sparse.

This patch is not suitable for stable, since the bug would only be
triggered on big endian systems, and the code only runs for Intel xHCI
host controllers, which are always integrated into little endian
systems.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci.c