diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-11-10 07:41:59 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-10 07:44:47 +0100 |
commit | 85a8181329a919d58b7ef99211251f47d5e1049e (patch) | |
tree | 846a21bf6dbc7e5c40eb1b9eebac4e030bd091fa /sound/usb | |
parent | 48b217aa43abc8c3545bb9b4d7a5b525b71d6ac2 (diff) | |
download | linux-85a8181329a919d58b7ef99211251f47d5e1049e.tar.bz2 |
ALSA: usb-audio: Fix Oops by composite quirk enhancement
The quirk argument itself was used as iterator, so it cannot be taken
back to the original value, obviously.
Fixes: d4b8fc66f770 ('ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/quirks.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index e9ff3a6c60e4..809d7fab4633 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -43,12 +43,13 @@ static int create_composite_quirk(struct snd_usb_audio *chip, struct usb_interface *iface, struct usb_driver *driver, - const struct snd_usb_audio_quirk *quirk) + const struct snd_usb_audio_quirk *quirk_comp) { int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber; + const struct snd_usb_audio_quirk *quirk; int err; - for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) { + for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); if (!iface) continue; @@ -60,7 +61,7 @@ static int create_composite_quirk(struct snd_usb_audio *chip, return err; } - for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) { + for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { iface = usb_ifnum_to_if(chip->dev, quirk->ifnum); if (!iface) continue; |