Skip to content
Commit e33eab9d authored by Dan Carpenter's avatar Dan Carpenter Committed by Johan Hovold
Browse files

USB: serial: ch341: fix type promotion bug in ch341_control_in()



The "r" variable is an int and "bufsize" is an unsigned int so the
comparison is type promoted to unsigned.  If usb_control_msg() returns a
negative that is treated as a high positive value and the error handling
doesn't work.

Fixes: 2d5a9c72 ("USB: serial: ch341: fix control-message error handling")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 021c9179
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment