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);
