lkml.org 
[lkml]   [2017]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 073/164] USB: chaoskey: fix Alea quirk on big-endian hosts
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Johan Hovold <johan@kernel.org>

    commit 63afd5cc78775018ea2dec4004428dafa5283e93 upstream.

    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: Bob Ham <bob.ham@collabora.com>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Keith Packard <keithp@keithp.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/usb/misc/chaoskey.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/usb/misc/chaoskey.c
    +++ b/drivers/usb/misc/chaoskey.c
    @@ -194,7 +194,7 @@ static int chaoskey_probe(struct usb_int

    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;

    \
     
     \ /
      Last update: 2017-05-23 23:44    [W:4.353 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site