qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4223] Prevent use of an uninitialised value in WM8750 and


From: Andrzej Zaborowski
Subject: [Qemu-devel] [4223] Prevent use of an uninitialised value in WM8750 and move buffer flush
Date: Sun, 20 Apr 2008 03:40:21 +0000

Revision: 4223
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4223
Author:   balrog
Date:     2008-04-20 03:40:20 +0000 (Sun, 20 Apr 2008)

Log Message:
-----------
Prevent use of an uninitialised value in WM8750 and move buffer flush
to a better place (Jan Kiszka).

Modified Paths:
--------------
    trunk/hw/wm8750.c

Modified: trunk/hw/wm8750.c
===================================================================
--- trunk/hw/wm8750.c   2008-04-20 01:03:45 UTC (rev 4222)
+++ trunk/hw/wm8750.c   2008-04-20 03:40:20 UTC (rev 4223)
@@ -76,10 +76,10 @@
 static void wm8750_audio_out_cb(void *opaque, int free_b)
 {
     struct wm8750_s *s = (struct wm8750_s *) opaque;
-    wm8750_out_flush(s);
 
     s->req_out = free_b;
     s->data_req(s->opaque, free_b >> 2, s->req_in >> 2);
+    wm8750_out_flush(s);
 }
 
 struct wm_rate_s {
@@ -213,6 +213,7 @@
 void wm8750_reset(i2c_slave *i2c)
 {
     struct wm8750_s *s = (struct wm8750_s *) i2c;
+    s->rate = &wm_rate_table[0];
     s->enable = 0;
     wm8750_set_format(s);
     s->diff[0] = 0;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]