Merge branch 'for-linus' into for-next
[muen/linux.git] / sound / usb / pcm.c
index 0372f62..2f6a80c 100644 (file)
@@ -519,9 +519,9 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
        if (WARN_ON(!iface))
                return -EINVAL;
        alts = usb_altnum_to_altsetting(iface, fmt->altsetting);
-       altsd = get_iface_desc(alts);
-       if (WARN_ON(altsd->bAlternateSetting != fmt->altsetting))
+       if (WARN_ON(!alts))
                return -EINVAL;
+       altsd = get_iface_desc(alts);
 
        if (fmt == subs->cur_audiofmt && !subs->need_setup_fmt)
                return 0;