usb: dwc2: fix sparse warning
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Fri, 25 Apr 2014 21:18:13 +0000 (14:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2014 21:56:16 +0000 (14:56 -0700)
commitd5dbd3f7d82223b59dc2200c0e9f4f95665a21a4
treefe6d0973a037164794a0bee13e873c8766381dd8
parent8355d39cc2128c80fd58309fdca825b1444bf067
usb: dwc2: fix sparse warning

Sparse warns about the __le16 wValue from the USB SetAddress
command being used without converting it to CPU endianness. Fix
that, and also add a bit of defensive masking of the received
wValue before using it.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/gadget.c