aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/drivers/char/ehci-dbgp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c
index 301eedf22e..b900d6092e 100644
--- a/xen/drivers/char/ehci-dbgp.c
+++ b/xen/drivers/char/ehci-dbgp.c
@@ -1094,6 +1094,9 @@ try_next_port:
dbgp_printk("n_ports: %u\n", n_ports);
ehci_dbgp_status(dbgp, "");
+ if ( n_ports == 0 )
+ return -1;
+
for ( i = 1; i <= n_ports; i++ )
{
portsc = readl(&dbgp->ehci_regs->port_status[i-1]);