audio: initialize card_head during object init
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
582ca26c99
commit
f6d1f9b1b9
1 changed files with 1 additions and 1 deletions
|
|
@ -1623,6 +1623,7 @@ static void audio_state_init(Object *obj)
|
|||
QLIST_INIT(&s->hw_head_out);
|
||||
QLIST_INIT(&s->hw_head_in);
|
||||
QLIST_INIT(&s->cap_head);
|
||||
QLIST_INIT(&s->card_head);
|
||||
s->ts = timer_new_ns(QEMU_CLOCK_VIRTUAL, audio_timer, s);
|
||||
|
||||
s->vmse = qemu_add_vm_change_state_handler(audio_vm_change_state_handler, s);
|
||||
|
|
@ -1792,7 +1793,6 @@ static AudioState *audio_init(Audiodev *dev, Error **errp)
|
|||
goto out;
|
||||
}
|
||||
object_unref(s);
|
||||
QLIST_INIT (&s->card_head);
|
||||
return s;
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue