sound: usb: Map interface context information to interface number

Driver is dynamically allocating memory based on bNumInterface from
device configuration descriptor and stores interface context
information using bInterfaceNum. Device can advertise
bInterfaceNum >= bNumInterface which results into out of bound memory
access. Hence create a mapping between interface context index and
interface number. Use this mapping to find unused context index or
load the context information of an interface.

Change-Id: Ic99b10abe662088c2c030526135689f7c78c595a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
1 file changed