Commit d0897554 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: chaoskey: fix Alea quirk on big-endian hosts

commit 63afd5cc upstream.

Add missing endianness conversion when applying the Alea timeout quirk.

Found using sparse:

	warning: restricted __le16 degrades to integer

Fixes: e4a886e8 ("hwrng: chaoskey - Fix URB warning due to timeout on Alea")
Cc: Bob Ham <bob.ham@collabora.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ed35d6c
...@@ -194,7 +194,7 @@ static int chaoskey_probe(struct usb_interface *interface, ...@@ -194,7 +194,7 @@ static int chaoskey_probe(struct usb_interface *interface,
dev->in_ep = in_ep; 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->reads_started = 1;
dev->size = size; dev->size = size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment