From: Johan Hovold Date: Thu, 11 May 2017 09:36:01 +0000 (+0200) Subject: USB: chaoskey: fix Alea quirk on big-endian hosts X-Git-Tag: MMI-PSA29.97-13-9~5558^2~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=63afd5cc78775018ea2dec4004428dafa5283e93;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git USB: chaoskey: fix Alea quirk on big-endian hosts Add missing endianness conversion when applying the Alea timeout quirk. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e4a886e811cd ("hwrng: chaoskey - Fix URB warning due to timeout on Alea") Cc: stable # 4.8 Cc: Bob Ham Cc: Herbert Xu Cc: Keith Packard Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c index e9cae4d82af2..15d4e64d3b65 100644 --- a/drivers/usb/misc/chaoskey.c +++ b/drivers/usb/misc/chaoskey.c @@ -192,7 +192,7 @@ static int chaoskey_probe(struct usb_interface *interface, dev->in_ep = in_ep; - if (udev->descriptor.idVendor != ALEA_VENDOR_ID) + if (le16_to_cpu(udev->descriptor.idVendor) != ALEA_VENDOR_ID) dev->reads_started = 1; dev->size = size;