From 0d9acba8fddbf970c7353083e6a60b47017ce3e4 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 12 May 2009 12:02:38 +0100 Subject: Make AUD_init failure fatal Failure to initialize the audio subsystem is not handled consistently. Where it is handled it has guest visible effects, which is wrong. We already have a "nosound" audio driver as a last resort, so trying to proceed without an audio backend seems pointless. Also protect against multiple calls to AUD_init so that this can be pushed down into individual devices. Signed-off-by: Paul Brook --- hw/mips_jazz.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'hw/mips_jazz.c') diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index 955041336b..3734aa918e 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -107,12 +107,10 @@ static void audio_init(qemu_irq *pic) AudioState *s; s = AUD_init(); - if (s) { - for (c = soundhw; c->name; ++c) { - if (c->enabled) { - if (c->isa) { - c->init.init_isa(s, pic); - } + for (c = soundhw; c->name; ++c) { + if (c->enabled) { + if (c->isa) { + c->init.init_isa(s, pic); } } } -- cgit v1.2.3-55-g7522