]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
USB: composite: Fix bug: low byte of w_index is the usb interface number not the...
authorBryan Wu <cooloney@kernel.org>
Wed, 7 Jan 2009 16:21:19 +0000 (00:21 +0800)
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>
Wed, 28 Jan 2009 00:15:35 +0000 (16:15 -0800)
commit08889517b3713926169d79d99782192e86acdc67
tree8d5a6641ef9e96fa100d08bf67603989cf90e00c
parentdd4dff8b035f6dda69ece98e20d4c2d76b9f97d1
USB: composite: Fix bug: low byte of w_index is the usb interface number not the whole 2 bytes of w_index

In some usb gadget driver, for example usb audio class device, the high
byte of w_index is the entity id and low byte is the interface number.
If we use the 2 bytes of w_index as the array number, we will get a
wrong pointer or NULL pointer.

This patch fixes this issue.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/composite.c