diff --git a/audio/audio.c b/audio/audio.c
index 3c311d7..84d9ae6 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1711,6 +1711,10 @@
     const char *drvname;
     AudioState *s = &glob_audio_state;
 
+    if (s->drv) {
+        return s;
+    }
+
     LIST_INIT (&s->hw_head_out);
     LIST_INIT (&s->hw_head_in);
     LIST_INIT (&s->cap_head);
@@ -1718,8 +1722,7 @@
 
     s->ts = qemu_new_timer (vm_clock, audio_timer, s);
     if (!s->ts) {
-        dolog ("Could not create audio timer\n");
-        return NULL;
+        hw_error("Could not create audio timer\n");
     }
 
     audio_process_options ("AUDIO", audio_options);
@@ -1772,37 +1775,30 @@
     if (!done) {
         done = !audio_driver_init (s, &no_audio_driver);
         if (!done) {
-            dolog ("Could not initialize audio subsystem\n");
+            hw_error("Could not initialize audio subsystem\n");
         }
         else {
             dolog ("warning: Using timer based audio emulation\n");
         }
     }
 
-    if (done) {
-        VMChangeStateEntry *e;
+    VMChangeStateEntry *e;
 
-        if (conf.period.hertz <= 0) {
-            if (conf.period.hertz < 0) {
-                dolog ("warning: Timer period is negative - %d "
-                       "treating as zero\n",
-                       conf.period.hertz);
-            }
-            conf.period.ticks = 1;
+    if (conf.period.hertz <= 0) {
+        if (conf.period.hertz < 0) {
+            dolog ("warning: Timer period is negative - %d "
+                   "treating as zero\n",
+                   conf.period.hertz);
         }
-        else {
-            conf.period.ticks = ticks_per_sec / conf.period.hertz;
-        }
-
-        e = qemu_add_vm_change_state_handler (audio_vm_change_state_handler, s);
-        if (!e) {
-            dolog ("warning: Could not register change state handler\n"
-                   "(Audio can continue looping even after stopping the VM)\n");
-        }
+        conf.period.ticks = 1;
+    } else {
+        conf.period.ticks = ticks_per_sec / conf.period.hertz;
     }
-    else {
-        qemu_del_timer (s->ts);
-        return NULL;
+
+    e = qemu_add_vm_change_state_handler (audio_vm_change_state_handler, s);
+    if (!e) {
+        dolog ("warning: Could not register change state handler\n"
+               "(Audio can continue looping even after stopping the VM)\n");
     }
 
     LIST_INIT (&s->card_head);
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index 9550413..3734aa9 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -107,12 +107,10 @@
         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);
                 }
             }
         }
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index e7504c1..015c16b 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -472,10 +472,9 @@
         AudioState *s;
 
         s = AUD_init ();
-        if (s) {
-            for (c = soundhw; c->name; ++c) {
-                if (c->enabled)
-                    c->init.init_pci (pci_bus, s);
+        for (c = soundhw; c->name; ++c) {
+            if (c->enabled) {
+                c->init.init_pci (pci_bus, s);
             }
         }
     }
diff --git a/hw/musicpal.c b/hw/musicpal.c
index b698610..0c47e5d 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -428,10 +428,6 @@
     int iomemtype;
 
     audio = AUD_init();
-    if (!audio) {
-        AUD_log(audio_name, "No audio state\n");
-        return NULL;
-    }
 
     s = qemu_mallocz(sizeof(musicpal_audio_state));
     s->irq = irq;
diff --git a/hw/pc.c b/hw/pc.c
index 6b46427..fe9d644 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -791,16 +791,14 @@
         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);
-                    }
-                    else {
-                        if (pci_bus) {
-                            c->init.init_pci (pci_bus, s);
-                        }
+        for (c = soundhw; c->name; ++c) {
+            if (c->enabled) {
+                if (c->isa) {
+                    c->init.init_isa (s, pic);
+                }
+                else {
+                    if (pci_bus) {
+                        c->init.init_pci (pci_bus, s);
                     }
                 }
             }
diff --git a/hw/spitz.c b/hw/spitz.c
index 3c155a4..e53a81d 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -744,8 +744,6 @@
     i2c_slave *wm;
 
     audio = AUD_init();
-    if (!audio)
-        return;
     /* Attach a WM8750 to the bus */
     wm = wm8750_init(bus, audio);
 
