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 <[email protected]>     # 4.8
Cc: Bob Ham <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Keith Packard <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
---
 drivers/usb/misc/chaoskey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to