diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
| -rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 5480352f984d..781546269d26 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -1317,6 +1317,10 @@ static int hub_configure(struct usb_hub *hub, | |||
| 1317 | message = "hub has too many ports!"; | 1317 | message = "hub has too many ports!"; |
| 1318 | ret = -ENODEV; | 1318 | ret = -ENODEV; |
| 1319 | goto fail; | 1319 | goto fail; |
| 1320 | } else if (hub->descriptor->bNbrPorts == 0) { | ||
| 1321 | message = "hub doesn't have any ports!"; | ||
| 1322 | ret = -ENODEV; | ||
| 1323 | goto fail; | ||
| 1320 | } | 1324 | } |
| 1321 | 1325 | ||
| 1322 | hdev->maxchild = hub->descriptor->bNbrPorts; | 1326 | hdev->maxchild = hub->descriptor->bNbrPorts; |
