From patchwork Tue Feb 7 11:15:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 9559697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0E9126047A for ; Tue, 7 Feb 2017 11:15:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06D4283CA for ; Tue, 7 Feb 2017 11:15:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C51E0283EE; Tue, 7 Feb 2017 11:15:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 98E3F283CA for ; Tue, 7 Feb 2017 11:15:43 +0000 (UTC) Received: from localhost ([::1]:53262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb3kM-0008O8-Cw for patchwork-qemu-devel@patchwork.kernel.org; Tue, 07 Feb 2017 06:15:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb3ju-0008KV-TK for qemu-devel@nongnu.org; Tue, 07 Feb 2017 06:15:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cb3jr-0002uW-Ps for qemu-devel@nongnu.org; Tue, 07 Feb 2017 06:15:14 -0500 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]:35392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cb3jr-0002uN-LA for qemu-devel@nongnu.org; Tue, 07 Feb 2017 06:15:11 -0500 Received: by mail-io0-x242.google.com with SMTP id m98so12484407iod.2 for ; Tue, 07 Feb 2017 03:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:date; bh=+jD2aDZpGttXl72F+6HhHWK8R08eZ1C3VEKn7v62X9I=; b=nhjnhrzZpIGm8ADZNbrkgK8GUg92UPirbHezSAc7lbnY4u93vZtGNFFFmtYBHfzIns P+i6knXbx2DhR5XppXXIYlSr3IY9cFRStXgFJXMJRxzi9/LjR3OnK/PKiOJ8gnCJH2Sp Picc9PFKl/Q+3N6Roq6DIg9qci4ngAdaNJu7O9piJ0/lTXeRA6z8wGe/TpohE7a/6aT/ potdX8R72ts/06hzGPE2P5zvnVNVuDJ0e1Cyj88DOZCjgYobayi39Fz2EgNSDk3f8jMq GD1JBs3otUY1O6RPsFdRR0BxF17fHC68YvUZua0vtx6Wu2V3UlI7gB7VE67zhcOJ63Eu XBmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:date; bh=+jD2aDZpGttXl72F+6HhHWK8R08eZ1C3VEKn7v62X9I=; b=ohXQgRnOcTiw16YFBP6uEJugCI5JxMf2NffXdtV/ZI3xnX1sKQ3iYCNm7DEd6SpXHn 2PBeZXNoNq10Hbl+LkZnGShaxTrB80ZFCJcTmZLZalnyEg143yjmTnN835l/ziJH2eiS U2sufCc+ak6JyU4f57TZEnqrc1AbXjG/0IgZbgzTm7Y4dZAndQHF7/shc1BdLq7jk78H 3t4RmHwOTeZp1sk3WuwnOUXHP9q+UXjalUO/W53XeaXhRJ6+ZWSVfnhVFww7ZOS9hNg5 rb2r7xtGVRKwt5rKnTUwyBNYngqijacYJ2J+vMYAkllZVyNUMRGhqTQdmHm5dLCUxAlE 4OMA== X-Gm-Message-State: AMke39mQDetG1qBzblr+Z6shFf0cHj0A4dUHYNcK7a6vosT7EIsQeLUGP/ldek1k/sxT4Q== X-Received: by 10.107.190.196 with SMTP id o187mr3458706iof.95.1486466111113; Tue, 07 Feb 2017 03:15:11 -0800 (PST) Received: from localhost.localdomain.localdomain ([104.192.110.250]) by smtp.gmail.com with ESMTPSA id k16sm5874049itk.2.2017.02.07.03.15.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 03:15:10 -0800 (PST) Message-ID: <5899ac3e.1033240a.944d5.9a2d@mx.google.com> X-Google-Original-Message-ID: <1486466103-128541-1-git-send-email-Qiang(liqiang6-s@360.cn)> From: Li Qiang X-Google-Original-From: Li Qiang(liqiang6-s@360.cn) To: kraxel@redhat.com, qemu-devel@nongnu.org Date: Tue, 7 Feb 2017 03:15:03 -0800 X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::242 Subject: [Qemu-devel] [PATCH] usb: ohci: fix error return code in servicing iso td X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Qiang Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Li Qiang It should return 1 if an error occurs when reading iso td. This will avoid an infinite loop issue in ohci_service_ed_list. Signed-off-by: Li Qiang --- hw/usb/hcd-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 4a63f3b..21c93e0 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -727,7 +727,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);