Index: uspace/drv/bus/usb/usbhub/port.c
===================================================================
--- uspace/drv/bus/usb/usbhub/port.c	(revision 585635856440deab73ad5891daab8fa87901aa68)
+++ uspace/drv/bus/usb/usbhub/port.c	(revision 3b47db687606b55f2694aaa5c4c6db563b5b61eb)
@@ -54,13 +54,13 @@
 };
 
-static int usb_hub_port_device_gone(usb_hub_port_t *port, usb_hub_dev_t *hub);
+static errno_t usb_hub_port_device_gone(usb_hub_port_t *port, usb_hub_dev_t *hub);
 static void usb_hub_port_reset_completed(usb_hub_port_t *port,
     usb_hub_dev_t *hub, usb_port_status_t status);
-static int get_port_status(usb_hub_port_t *port, usb_port_status_t *status);
-static int add_device_phase1_worker_fibril(void *arg);
-static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
+static errno_t get_port_status(usb_hub_port_t *port, usb_port_status_t *status);
+static errno_t add_device_phase1_worker_fibril(void *arg);
+static errno_t create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
     usb_speed_t speed);
 
-int usb_hub_port_fini(usb_hub_port_t *port, usb_hub_dev_t *hub)
+errno_t usb_hub_port_fini(usb_hub_port_t *port, usb_hub_dev_t *hub)
 {
 	assert(port);
@@ -77,5 +77,5 @@
  * @return Operation result
  */
-int usb_hub_port_clear_feature(
+errno_t usb_hub_port_clear_feature(
     usb_hub_port_t *port, usb_hub_class_feature_t feature)
 {
@@ -99,5 +99,5 @@
  * @return Operation result
  */
-int usb_hub_port_set_feature(
+errno_t usb_hub_port_set_feature(
     usb_hub_port_t *port, usb_hub_class_feature_t feature)
 {
@@ -143,5 +143,5 @@
 
 	usb_port_status_t status = 0;
-	const int opResult = get_port_status(port, &status);
+	const errno_t opResult = get_port_status(port, &status);
 	if (opResult != EOK) {
 		usb_log_error("(%p-%u): Failed to get port status: %s.\n", hub,
@@ -158,5 +158,5 @@
 
 		/* ACK the change */
-		const int opResult = usb_hub_port_clear_feature(port,
+		const errno_t opResult = usb_hub_port_clear_feature(port,
 		    USB_HUB_FEATURE_C_PORT_CONNECTION);
 		if (opResult != EOK) {
@@ -167,5 +167,5 @@
 
 		if (connected) {
-			const int opResult = create_add_device_fibril(port, hub,
+			const errno_t opResult = create_add_device_fibril(port, hub,
 			    usb_port_speed(status));
 			if (opResult != EOK) {
@@ -191,5 +191,5 @@
 		   port->port_number);
 		usb_hub_port_device_gone(port, hub);
-		const int rc = usb_hub_port_clear_feature(port,
+		const errno_t rc = usb_hub_port_clear_feature(port,
 		        USB_HUB_FEATURE_C_PORT_ENABLE);
 		if (rc != EOK) {
@@ -206,5 +206,5 @@
 		    " NOT happen as we do not support suspend state!", hub,
 		    port->port_number);
-		const int rc = usb_hub_port_clear_feature(port,
+		const errno_t rc = usb_hub_port_clear_feature(port,
 		        USB_HUB_FEATURE_C_PORT_SUSPEND);
 		if (rc != EOK) {
@@ -224,5 +224,5 @@
 		 * mode. USB system software is responsible for powering port
 		 * back on when the over-current condition is gone */
-		const int rc = usb_hub_port_clear_feature(port,
+		const errno_t rc = usb_hub_port_clear_feature(port,
 		    USB_HUB_FEATURE_C_PORT_OVER_CURRENT);
 		if (rc != EOK) {
@@ -232,5 +232,5 @@
 		}
 		if (!(status & ~USB_HUB_PORT_STATUS_OC)) {
-			const int rc = usb_hub_port_set_feature(
+			const errno_t rc = usb_hub_port_set_feature(
 			    port, USB_HUB_FEATURE_PORT_POWER);
 			if (rc != EOK) {
@@ -260,5 +260,5 @@
  * @param hub hub representation
  */
-int usb_hub_port_device_gone(usb_hub_port_t *port, usb_hub_dev_t *hub)
+errno_t usb_hub_port_device_gone(usb_hub_port_t *port, usb_hub_dev_t *hub)
 {
 	assert(port);
@@ -267,5 +267,5 @@
 	if (!exch)
 		return ENOMEM;
-	const int rc = usb_device_remove(exch, port->port_number);
+	const errno_t rc = usb_device_remove(exch, port->port_number);
 	usb_device_bus_exchange_end(exch);
 	if (rc == EOK)
@@ -304,5 +304,5 @@
 
 	/* Clear the port reset change. */
-	int rc = usb_hub_port_clear_feature(port, USB_HUB_FEATURE_C_PORT_RESET);
+	errno_t rc = usb_hub_port_clear_feature(port, USB_HUB_FEATURE_C_PORT_RESET);
 	if (rc != EOK) {
 		usb_log_error("(%p-%u): Failed to clear port reset change: %s.",
@@ -317,5 +317,5 @@
  * @return Error code.
  */
-static int get_port_status(usb_hub_port_t *port, usb_port_status_t *status)
+static errno_t get_port_status(usb_hub_port_t *port, usb_port_status_t *status)
 {
 	assert(port);
@@ -333,5 +333,5 @@
 	usb_port_status_t status_tmp;
 
-	const int rc = usb_pipe_control_read(port->control_pipe,
+	const errno_t rc = usb_pipe_control_read(port->control_pipe,
 	    &request, sizeof(usb_device_request_setup_packet_t),
 	    &status_tmp, sizeof(status_tmp), &recv_size);
@@ -351,8 +351,8 @@
 }
 
-static int port_enable(usb_hub_port_t *port, usb_hub_dev_t *hub, bool enable)
+static errno_t port_enable(usb_hub_port_t *port, usb_hub_dev_t *hub, bool enable)
 {
 	if (enable) {
-		int rc =
+		errno_t rc =
 		    usb_hub_port_set_feature(port, USB_HUB_FEATURE_PORT_RESET);
 		if (rc != EOK) {
@@ -383,10 +383,10 @@
  * @return 0 Always.
  */
-int add_device_phase1_worker_fibril(void *arg)
+errno_t add_device_phase1_worker_fibril(void *arg)
 {
 	struct add_device_phase1 *params = arg;
 	assert(params);
 
-	int ret = EOK;
+	errno_t ret = EOK;
 	usb_hub_dev_t *hub = params->hub;
 	usb_hub_port_t *port = params->port;
@@ -434,5 +434,5 @@
 		usb_log_error("(%p-%u): Failed to enumerate device: %s", hub,
 		    port->port_number, str_error(ret));
-		const int ret = port_enable(port, hub, false);
+		const errno_t ret = port_enable(port, hub, false);
 		if (ret != EOK) {
 			usb_log_warning("(%p-%u)Failed to disable port (%s), "
@@ -440,5 +440,5 @@
 			    port->port_number, str_error(ret));
 		} else {
-			const int ret = usb_release_default_address(exch);
+			const errno_t ret = usb_release_default_address(exch);
 			if (ret != EOK)
 				usb_log_warning("(%p-%u): Failed to release "
@@ -475,5 +475,5 @@
  * @return Error code.
  */
-static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
+static errno_t create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub,
     usb_speed_t speed)
 {
