We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb41f27 commit f67d71aCopy full SHA for f67d71a
sound/usb/stream.c
@@ -125,11 +125,9 @@ static int usb_chmap_ctl_info(struct snd_kcontrol *kcontrol,
125
static bool have_dup_chmap(struct snd_usb_substream *subs,
126
struct audioformat *fp)
127
{
128
- struct list_head *p;
+ struct audioformat *prev = fp;
129
130
- for (p = fp->list.prev; p != &subs->fmt_list; p = p->prev) {
131
- struct audioformat *prev;
132
- prev = list_entry(p, struct audioformat, list);
+ list_for_each_entry_continue_reverse(prev, &subs->fmt_list, list) {
133
if (prev->chmap &&
134
!memcmp(prev->chmap, fp->chmap, sizeof(*fp->chmap)))
135
return true;
0 commit comments