OSDN Git Service

USB: serial: mos7720: fix control-message error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:17 +0000 (14:56 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 16 Jan 2017 15:38:56 +0000 (16:38 +0100)
commit0d130367abf582e7cbf60075c2a7ab53817b1d14
treef3a87ef9f5e0e24bb08192ecaba15aee164a4999
parent36356a669eddb32917fc4b5c2b9b8bf80ede69de
USB: serial: mos7720: fix control-message error handling

Make sure to log an error on short transfers when reading a device
register.

Also clear the provided buffer (which if often an uninitialised
automatic variable) on errors as the driver currently does not bother to
check for errors.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7720.c