diff options
| author | Martin Kletzander <mkletzan@redhat.com> | 2023-10-02 16:27:57 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-03 10:29:40 +0200 |
| commit | cb94ff5f80c537e43c04fa4f071f1df784255310 (patch) | |
| tree | 18907d34d44c8e344ea2174c5bd80e6fa8dc5169 /hw/audio/cs4231a.c | |
| parent | 9dcb64c96073e9898105cdbef6553cfef0fadcdb (diff) | |
| download | focaccia-qemu-cb94ff5f80c537e43c04fa4f071f1df784255310.tar.gz focaccia-qemu-cb94ff5f80c537e43c04fa4f071f1df784255310.zip | |
audio: propagate Error * out of audio_init
Starting from audio_driver_init, propagate errors via Error ** so that audio_init_audiodevs can simply pass &error_fatal, and AUD_register_card can signal faiure. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> [Reworked the audio/audio.c parts, while keeping Martin's hw/ changes. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/audio/cs4231a.c')
| -rw-r--r-- | hw/audio/cs4231a.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index 5c6d643732..3aa105748d 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -678,13 +678,15 @@ static void cs4231a_realizefn (DeviceState *dev, Error **errp) return; } + if (!AUD_register_card ("cs4231a", &s->card, errp)) { + return; + } + s->pic = isa_bus_get_irq(bus, s->irq); k = ISADMA_GET_CLASS(s->isa_dma); k->register_channel(s->isa_dma, s->dma, cs_dma_read, s); isa_register_ioport (d, &s->ioports, s->port); - - AUD_register_card ("cs4231a", &s->card); } static Property cs4231a_properties[] = { |