Index: uspace/drv/bus/usb/usbhub/usbhub.c
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.c	(revision eda7a4e07322d02834082cb99a4b1b563e7ab88b)
+++ uspace/drv/bus/usb/usbhub/usbhub.c	(revision a14d6a7e189dc760da46398ce5b7976020f1aa8a)
@@ -178,5 +178,5 @@
 
 	opResult = usb_device_auto_poll(hub_dev->usb_device, 0,
-	    hub_port_changes_callback, ((hub_dev->port_count + 1) / 8) + 1,
+	    hub_port_changes_callback, ((hub_dev->port_count + 1 + 8) / 8),
 	    usb_hub_polling_terminated_callback, hub_dev);
 	if (opResult != EOK) {
@@ -223,7 +223,7 @@
 
 	/* N + 1 bit indicates change on port N */
-	size_t port = 1;
-	for (; port < hub->port_count + 1; port++) {
-		const bool change = (change_bitmap[port / 8] >> (port % 8)) & 1;
+	for (size_t port = 0; port < hub->port_count + 1; port++) {
+		const size_t bit = port + 1;
+		const bool change = (change_bitmap[bit / 8] >> (bit % 8)) & 1;
 		if (change) {
 			usb_hub_port_process_interrupt(&hub->ports[port], hub);
@@ -250,5 +250,5 @@
 
 	hub_dev->ports = NULL;
-	hub_dev->port_count = -1;
+	hub_dev->port_count = 0;
 	hub_dev->pending_ops_count = 0;
 	hub_dev->running = false;
@@ -293,13 +293,12 @@
 	hub_dev->port_count = descriptor.port_count;
 
-	// TODO: +1 hack is no longer necessary
-	hub_dev->ports =
-	    calloc(hub_dev->port_count + 1, sizeof(usb_hub_port_t));
+	hub_dev->ports = calloc(hub_dev->port_count, sizeof(usb_hub_port_t));
 	if (!hub_dev->ports) {
 		return ENOMEM;
 	}
 
-	for (size_t port = 1; port < hub_dev->port_count + 1; ++port) {
-		usb_hub_port_init(&hub_dev->ports[port], port, control_pipe);
+	for (size_t port = 0; port < hub_dev->port_count; ++port) {
+		usb_hub_port_init(
+		    &hub_dev->ports[port], port + 1, control_pipe);
 	}
 
@@ -311,5 +310,5 @@
 		    & HUB_CHAR_POWER_PER_PORT_FLAG;
 
-		for (size_t port = 1; port <= hub_dev->port_count; ++port) {
+		for (size_t port = 0; port < hub_dev->port_count; ++port) {
 			usb_log_debug("Powering port %zu.\n", port);
 			opResult = usb_hub_port_set_feature(
@@ -398,8 +397,8 @@
 		/* Over-current condition is gone, it is safe to turn the
 		 * ports on. */
-		size_t port;
-		for (port = 1; port <= hub_dev->port_count; ++port) {
+		for (size_t port = 0; port < hub_dev->port_count; ++port) {
 			const int opResult = usb_hub_port_set_feature(
 			    &hub_dev->ports[port], USB_HUB_FEATURE_PORT_POWER);
+			// TODO: consider power policy here
 			if (opResult != EOK) {
 				usb_log_warning(
@@ -507,6 +506,5 @@
 	 */
 	if (hub->pending_ops_count > 0) {
-		size_t port;
-		for (port = 0; port < hub->port_count; port++) {
+		for (size_t port = 0; port < hub->port_count; ++port) {
 			usb_hub_port_reset_fail(&hub->ports[port]);
 		}
