USB: serial: io_edgeport: fix descriptor error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:14 +0000 (14:56 +0100)
committerSasha Levin <alexander.levin@verizon.com>
Tue, 13 Jun 2017 13:29:20 +0000 (09:29 -0400)
commit2c7105e86e3d44ede962f691d031b312060e7387
treea3850d8df566cb1c61f81dc3c99a1d1da3db3c52
parent00f244650faff0528541ca1e5927a4c7b024bfa4
USB: serial: io_edgeport: fix descriptor error handling

[ Upstream commit 3c0e25d883d06a1fbd1ad35257e8abaa57befb37 ]

Make sure to detect short control-message transfers and log an error
when reading incomplete manufacturer and boot descriptors.

Note that the default all-zero descriptors will now be used after a
short transfer is detected instead of partially initialised ones.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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>
drivers/usb/serial/io_edgeport.c