Skip to content
Commit 08889517 authored by Bryan Wu's avatar Bryan Wu Committed by Greg Kroah-Hartman
Browse files

USB: composite: Fix bug: low byte of w_index is the usb interface number not...


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: default avatarBryan Wu <cooloney@kernel.org>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dd4dff8b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment