4645beb
From 26f670a244982335cc08943fb1ec099a2c81e42d Mon Sep 17 00:00:00 2001
4645beb
From: Li Qiang <liqiang6-s@360.cn>
4645beb
Date: Tue, 7 Feb 2017 03:15:03 -0800
4645beb
Subject: [PATCH] usb: ohci: fix error return code in servicing iso td
4645beb
4645beb
It should return 1 if an error occurs when reading iso td.
4645beb
This will avoid an infinite loop issue in ohci_service_ed_list.
4645beb
4645beb
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
4645beb
Message-id: 5899ac3e.1033240a.944d5.9a2d@mx.google.com
4645beb
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
4645beb
---
4645beb
 hw/usb-ohci.c | 2 +-
4645beb
 1 file changed, 1 insertion(+), 1 deletion(-)
4645beb
4645beb
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
4645beb
index c82a92f..2cba3e3 100644
4645beb
--- a/hw/usb-ohci.c
4645beb
+++ b/hw/usb-ohci.c
4645beb
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed,
4645beb
 
4645beb
     if (!ohci_read_iso_td(addr, &iso_td)) {
4645beb
         printf("usb-ohci: ISO_TD read error at %x\n", addr);
4645beb
-        return 0;
4645beb
+        return 1;
4645beb
     }
4645beb
 
4645beb
     starting_frame = OHCI_BM(iso_td.flags, TD_SF);
4645beb
-- 
4645beb
1.8.3.1
4645beb