USB: serial: mos7840: fix control-message error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:18 +0000 (14:56 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 16 Jan 2017 15:38:56 +0000 (16:38 +0100)
commitcd8db057e93ddaacbec025b567490555d2bca280
tree873ec9859425b3b2769e36bcafb959a52ac3a25d
parent0d130367abf582e7cbf60075c2a7ab53817b1d14
USB: serial: mos7840: fix control-message error handling

Make sure to detect short transfers when reading a device register.

The modem-status handling had sufficient error checks in place, but move
handling of short transfers into the register accessor function itself
for consistency.

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