Commit 2d5185c7 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Remove interface/altsettings assumption from audio driver

This patch updates the USB audio class driver to use the usb_ifnum_to_if()
and usb_altnum_to_altsetting() routines, thereby removing assumptions
about which interface or altsetting is stored in which array entry.

It also simplifies the driver's probe() routine by using the raw
configuration descriptor already loaded into memory instead of reading the
descriptor from the device.  Now, either the current driver has a bug and
never deallocates the buffer used to hold the descriptor, or else I've
introduced a double-free error.  There's no obvious place where the buffer
gets freed, but it's hard to be certain.

It would be good if someone could try out this patch.  I can't test it,
not having any USB audio devices handy.  If the double-free error is
present, it will show up when the device is disconnected and the
configuration data is released.
parent 40c72cb0
This diff is collapsed.
Markdown is supported
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