aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb-hub.c')
-rw-r--r--hw/usb-hub.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 1aee7fe5b4..2a1edfc956 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -366,11 +366,10 @@ static int usb_hub_handle_control(USBDevice *dev, int request, int value,
{
unsigned int n = index - 1;
USBHubPort *port;
- USBDevice *dev;
+
if (n >= s->nb_ports)
goto fail;
port = &s->ports[n];
- dev = port->port.dev;
switch(value) {
case PORT_ENABLE:
port->wPortStatus &= ~PORT_STAT_ENABLE;