]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: mct_u232: fix big-endian baud-rate handling
authorJohan Hovold <johan@kernel.org>
Thu, 11 May 2017 09:41:20 +0000 (11:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:40 +0000 (15:44 +0200)
commitc3e024ff91806856059c2fad64ad535bf6bf37eb
tree9e52919edd74c7fdf1bf8c3492bd6bf47c4287ab
parentd8fc44d6748862d70d716c2cadd294660563e74e
USB: serial: mct_u232: fix big-endian baud-rate handling

commit 26cede343656c0bc2c33cdc783771282405c7fb2 upstream.

Drop erroneous cpu_to_le32 when setting the baud rate, something which
corrupted the divisor on big-endian hosts.

Found using sparse:

warning: incorrect type in argument 1 (different base types)
    expected unsigned int [unsigned] [usertype] val
    got restricted __le32 [usertype] <noident>

Fixes: af2ac1a091bc ("USB: serial mct_usb232: move DMA buffers to heap")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-By: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mct_u232.c