diff options
| author | Alan Stern <stern@rowland.harvard.edu> | 2009-02-20 16:33:08 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-16 17:52:47 -0700 |
| commit | 030b079bbda2a3b1c37198b62bd955f2da0b9172 (patch) | |
| tree | 0b3ffa5f056af71b6007c613e813536ce85ff8dc /include/linux/loop.h | |
| parent | b61e99b179056c29db2c29c353b8243e4943b296 (diff) | |
USB: usb_get_string should check the descriptor type
commit 67f5a4ba9741fcef3f4db3509ad03565d9e33af2 upstream.
This patch (as1218) fixes a problem with a radio-control joystick used
in the "walkera 4#3" helicopter. This device responds to the initial
Get-String-Descriptor request for string 0 (which is really the list
of supported languages) by sending its config descriptor! The
usb_get_string() routine needs to check whether it got the right
type of descriptor.
Oddly enough, this sort of check is already present in
usb_get_descriptor(). The patch changes the error code from -EPROTO
to -ENODATA, because -EPROTO shows up in so many other contexts to
indicate a hardware failure rather than a firmware error.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Guillermo Jarabo <williamjap@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/loop.h')
0 files changed, 0 insertions, 0 deletions
