]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:11:20 +0000 (10:11 +0200)
commit61e43da985aa188b075e275e1297131df0573aef
treeafad1b7de54b5268c5159df2d785d684591f895a
parent920027fef71971daf64658c6f6bbfdebde161b0a
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