USB: serial: mos7840: fix control-message error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:18 +0000 (14:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2017 08:26:06 +0000 (10:26 +0200)
commitc6d263e6b30af4040a61bcceef2fdae33711ad0d
treeaa1b9f33d5366f330387f1bf1ca04654dbe6ce9a
parent9553708eb98dd81357eb9be51b6317387d2e7ac4
USB: serial: mos7840: fix control-message error handling

[ Upstream commit cd8db057e93ddaacbec025b567490555d2bca280 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c