diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-07-04 12:29:38 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-17 11:31:43 +0200 |
| commit | a82597e92e47980261f8cfb37008026730a3a585 (patch) | |
| tree | 6cd1d4906b036c7966ed0a18866be9469225960f /tools/perf/scripts/python | |
| parent | 54b594369ae19fc64b45ca045c26005d5de095d8 (diff) | |
USB: serial: ch341: fix type promotion bug in ch341_control_in()
commit e33eab9ded328ccc14308afa51b5be7cbe78d30b upstream.
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: 2d5a9c72d0c4 ("USB: serial: ch341: fix control-message error handling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
