diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-02-20 22:33:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-27 23:40:50 +0100 |
commit | 67f5a4ba9741fcef3f4db3509ad03565d9e33af2 (patch) | |
tree | bf27a10cfe13a95144e04cd50136a8f55e3b2a3c /drivers/usb/musb | |
parent | USB: gadget: fix build error in omap_apollon_2420_defconfig (diff) | |
download | linux-67f5a4ba9741fcef3f4db3509ad03565d9e33af2.tar.xz linux-67f5a4ba9741fcef3f4db3509ad03565d9e33af2.zip |
USB: usb_get_string should check the descriptor type
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
===================================================================
Diffstat (limited to 'drivers/usb/musb')
0 files changed, 0 insertions, 0 deletions