cdc-wdm endianness fixes

* wMaxPacketSize is le16; copying it to a field of local structure and then
using that field as host-endian (size of object to be allocated) is broken.
* bMaxPacketSize0 is 8-bit; feeding it to le16_to_cpu() is bogus and since the
result is used as host-endian, it's not even misspelled cpu_to_le16().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Al Viro and committed by Linus Torvalds fa4144b7 76e6f252

+2 -2
+2 -2
drivers/usb/class/cdc-wdm.c
··· 611 611 goto err; 612 612 } 613 613 614 - desc->wMaxPacketSize = ep->wMaxPacketSize; 615 - desc->bMaxPacketSize0 = cpu_to_le16(udev->descriptor.bMaxPacketSize0); 614 + desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize); 615 + desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0; 616 616 617 617 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); 618 618 if (!desc->orq)