]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.git/commitdiff
intel-hda: fix stream search
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 2 Nov 2011 11:56:14 +0000 (12:56 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 2 Nov 2011 12:51:58 +0000 (07:51 -0500)
commit ba43d28916c4f51c19bd7366089155ce81bee058 introduces a bug:
The stream-not-found case doesn't error out any more, instead the
code silently uses the first stream.  Fix it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/intel-hda.c

index 02def4c1e1a8a6d728f9ee393d139dc09ff81b55..10769e0f49829e844a052f4dae24e96405483824 100644 (file)
@@ -402,7 +402,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
             break;
         }
     }
-    if (st == NULL) {
+    if (s == 4) {
         return false;
     }
     if (st->bpl == NULL) {