]> git.baikalelectronics.ru Git - kernel.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)
committerJohan Hovold <johan@kernel.org>
Mon, 15 May 2017 09:51:15 +0000 (11:51 +0200)
commit5182d962be0ca96b32693a81da77cfda496c0150
treea3f6d25d62b373a84fc8fdf1cc76cdac27ad8c73
parent0828340dfa5db161f431c4886da5f1fb64acf14f
USB: serial: mct_u232: fix big-endian baud-rate handling

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: 140425f49a78 ("USB: serial mct_usb232: move DMA buffers to heap")
Cc: stable <stable@vger.kernel.org> # 2.6.34
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-By: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mct_u232.c