]> asedeno.scripts.mit.edu Git - linux.git/commit
USB: serial: cast sizeof() to int when comparing with error code
authorChengguang Xu <cgxu519@gmx.com>
Mon, 25 Jun 2018 07:35:18 +0000 (15:35 +0800)
committerJohan Hovold <johan@kernel.org>
Mon, 25 Jun 2018 08:34:31 +0000 (10:34 +0200)
commit3391ca1dcd70a8e958984f7e95f242d36f0b9ab8
tree46f126bb63af361216187d7b8540a7037adce9ce
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819
USB: serial: cast sizeof() to int when comparing with error code

Negative error code will be larger than sizeof().

Note that none of these bugs prevent errors from being detected, even if
the ir-usb one would cause a less precise debug message to printed.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
[ johan: add comment about implications ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ir-usb.c
drivers/usb/serial/quatech2.c
drivers/usb/serial/ssu100.c