X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sound%2Fhda%2Fext%2Fhdac_ext_stream.c;h=626f3bb24c55da1411f3616566c94253c89ece79;hb=6ea24cf79e055f0a62a64baa8587e2254a493c7b;hp=023cc4cad5c1965b31a334503d94c37752e733e4;hpb=89916cc90a78fffbc4c3d7cb1f6540fb2e551804;p=deliverable%2Flinux.git diff --git a/sound/hda/ext/hdac_ext_stream.c b/sound/hda/ext/hdac_ext_stream.c index 023cc4cad5c1..626f3bb24c55 100644 --- a/sound/hda/ext/hdac_ext_stream.c +++ b/sound/hda/ext/hdac_ext_stream.c @@ -104,12 +104,11 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_init_all); */ void snd_hdac_stream_free_all(struct hdac_ext_bus *ebus) { - struct hdac_stream *s; + struct hdac_stream *s, *_s; struct hdac_ext_stream *stream; struct hdac_bus *bus = ebus_to_hbus(ebus); - while (!list_empty(&bus->stream_list)) { - s = list_first_entry(&bus->stream_list, struct hdac_stream, list); + list_for_each_entry_safe(s, _s, &bus->stream_list, list) { stream = stream_to_hdac_ext_stream(s); snd_hdac_ext_stream_decouple(ebus, stream, false); list_del(&s->list);