From patchwork Wed Nov 2 11:56:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hoffmann, Gerd" X-Patchwork-Id: 123258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5EBCBB6F70 for ; Wed, 2 Nov 2011 22:56:36 +1100 (EST) Received: from localhost ([::1]:33014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLZQk-0005LD-QB for incoming@patchwork.ozlabs.org; Wed, 02 Nov 2011 07:56:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLZQe-0005Kw-Rn for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:56:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLZQd-0006bz-Q5 for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:56:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLZQd-0006bi-GP for qemu-devel@nongnu.org; Wed, 02 Nov 2011 07:56:23 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA2BuHAU031742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Nov 2011 07:56:17 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA2BuFIR030971; Wed, 2 Nov 2011 07:56:16 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 8D666401C5; Wed, 2 Nov 2011 12:56:14 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 2 Nov 2011 12:56:14 +0100 Message-Id: <1320234974-15318-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: marcandre.lureau@gmail.com, Gerd Hoffmann Subject: [Qemu-devel] [PATCH] intel-hda: fix stream search X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Markus Armbruster --- hw/intel-hda.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 675b659..b7ec36d 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -401,7 +401,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) {