diff options
Diffstat (limited to 'hw/usb/dev-audio.c')
-rw-r--r-- | hw/usb/dev-audio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 8748c1b..d5ac1f8 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -944,12 +944,15 @@ static void usb_audio_realize(USBDevice *dev, Error **errp) USBAudioState *s = USB_AUDIO(dev); int i; + if (!AUD_register_card(TYPE_USB_AUDIO, &s->card, errp)) { + return; + } + dev->usb_desc = s->multi ? &desc_audio_multi : &desc_audio; usb_desc_create_serial(dev); usb_desc_init(dev); s->dev.opaque = s; - AUD_register_card(TYPE_USB_AUDIO, &s->card); s->out.altset = ALTSET_OFF; s->out.vol.mute = false; |