Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 75f9dcdd9b7392a4362fdef432836040ef6eee7b)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision 6f057052da090fb166eafe0b3b3b33ed000ac51c)
@@ -469,5 +469,5 @@
 	assert(port);
 	struct add_device_phase1 *data
-	    = malloc(sizeof (struct add_device_phase1));
+	    = malloc(sizeof(struct add_device_phase1));
 	if (data == NULL) {
 		return ENOMEM;
Index: uspace/drv/bus/usb/usbhub/usbhub.c
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.c	(revision 75f9dcdd9b7392a4362fdef432836040ef6eee7b)
+++ uspace/drv/bus/usb/usbhub/usbhub.c	(revision 6f057052da090fb166eafe0b3b3b33ed000ac51c)
@@ -212,7 +212,7 @@
 	info->ports = NULL;
 	info->port_count = -1;
+	info->pending_ops_count = 0;
 	fibril_mutex_initialize(&info->pending_ops_mutex);
 	fibril_condvar_initialize(&info->pending_ops_cv);
-	info->pending_ops_count = 0;
 
 	return info;
@@ -254,11 +254,10 @@
 	// TODO: +1 hack is no longer necessary
 	hub_info->ports =
-	    malloc(sizeof(usb_hub_port_t) * (hub_info->port_count + 1));
+	    calloc(hub_info->port_count + 1, sizeof(usb_hub_port_t));
 	if (!hub_info->ports) {
 		return ENOMEM;
 	}
 
-	size_t port;
-	for (port = 0; port < hub_info->port_count + 1; ++port) {
+	for (size_t port = 1; port < hub_info->port_count + 1; ++port) {
 		usb_hub_port_init(&hub_info->ports[port], port, control_pipe);
 	}
@@ -271,5 +270,5 @@
 		    & HUB_CHAR_POWER_PER_PORT_FLAG;
 
-		for (port = 1; port <= hub_info->port_count; ++port) {
+		for (size_t port = 1; port <= hub_info->port_count; ++port) {
 			usb_log_debug("Powering port %zu.\n", port);
 			opResult = usb_hub_port_set_feature(
