OSDN Git Service

USB: serial: kobil_sct: fix modem-status error handling
authorJohan Hovold <johan@kernel.org>
Wed, 4 Jul 2018 15:02:18 +0000 (17:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:52:04 +0000 (08:52 +0200)
commit5fe874e1f3499a77f8a0c29712c9a0c85eb59c98
tree700c99fe2aa7886084840e90512e49db51285344
parent850f9c0c1b8412ac4b4f571d338f554c0eac53cf
USB: serial: kobil_sct: fix modem-status error handling

[ Upstream commit a420b5d939ee58f1d950f0ea782834056520aeaa ]

Make sure to return -EIO in case of a short modem-status read request.

While at it, split the debug message to not include the (zeroed)
transfer-buffer content in case of errors.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/kobil_sct.c