From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Li Qiang <liq3ea@gmail.com>, Li Qiang <liqiang6-s@360.cn>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 2/3] usb: ohci: fix error return code in servicing td
Date: Thu, 23 Feb 2017 16:40:13 +0100 [thread overview]
Message-ID: <1487864414-25485-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1487864414-25485-1-git-send-email-kraxel@redhat.com>
From: Li Qiang <liq3ea@gmail.com>
It should return 1 if an error occurs when reading td.
This will avoid an infinite loop issue in ohci_service_ed_list.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1487760990-115925-1-git-send-email-liqiang6-s@360.cn
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 21c93e0..fe8406a 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1001,7 +1001,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
if (ohci_read_td(ohci, addr, &td)) {
trace_usb_ohci_td_read_error(addr);
ohci_die(ohci);
- return 0;
+ return 1;
}
dir = OHCI_BM(ed->flags, ED_D);
--
1.8.3.1
next prev parent reply other threads:[~2017-02-23 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 15:40 [Qemu-devel] [PULL 0/3] usb patch queue Gerd Hoffmann
2017-02-23 15:40 ` [Qemu-devel] [PULL 1/3] usb: replace handle_destroy with unrealize Gerd Hoffmann
2017-02-23 15:40 ` Gerd Hoffmann [this message]
2017-02-23 15:40 ` [Qemu-devel] [PULL 3/3] xhci: properties cleanup Gerd Hoffmann
2017-02-24 13:55 ` [Qemu-devel] [PULL 0/3] usb patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487864414-25485-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=liq3ea@gmail.com \
--cc=liqiang6-s@360.cn \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).