Index: uspace/lib/usbhost/include/usb/host/ddf_helpers.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/ddf_helpers.h	(revision 68e540652e175b4bfb5504f9363d31c97d4c5a17)
+++ uspace/lib/usbhost/include/usb/host/ddf_helpers.h	(revision 393302009dc835da26285d65656e166c29b4540f)
@@ -45,8 +45,8 @@
 #include <device/hw_res_parsed.h>
 
-typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, bool);
+typedef errno_t (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, bool);
 typedef void (*driver_fini_t)(hcd_t *);
-typedef int (*claim_t)(ddf_dev_t *);
-typedef int (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *, int *);
+typedef errno_t (*claim_t)(ddf_dev_t *);
+typedef errno_t (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *, int *);
 
 typedef struct {
@@ -61,19 +61,19 @@
 } ddf_hc_driver_t;
 
-int hcd_ddf_add_hc(ddf_dev_t *device, const ddf_hc_driver_t *driver);
+errno_t hcd_ddf_add_hc(ddf_dev_t *device, const ddf_hc_driver_t *driver);
 
-int hcd_ddf_setup_hc(ddf_dev_t *device, usb_speed_t max_speed,
+errno_t hcd_ddf_setup_hc(ddf_dev_t *device, usb_speed_t max_speed,
     size_t bw, bw_count_func_t bw_count);
 void hcd_ddf_clean_hc(ddf_dev_t *device);
-int hcd_ddf_setup_root_hub(ddf_dev_t *device);
+errno_t hcd_ddf_setup_root_hub(ddf_dev_t *device);
 
 hcd_t *dev_to_hcd(ddf_dev_t *dev);
 
-int hcd_ddf_enable_interrupt(ddf_dev_t *device, int);
-int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res);
-int hcd_ddf_setup_interrupts(ddf_dev_t *device,
+errno_t hcd_ddf_enable_interrupt(ddf_dev_t *device, int);
+errno_t hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res);
+errno_t hcd_ddf_setup_interrupts(ddf_dev_t *device,
     const hw_res_list_parsed_t *hw_res,
     interrupt_handler_t handler,
-    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *, int *),
+    errno_t (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *, int *),
     cap_handle_t *handle);
 void ddf_hcd_gen_irq_handler(ipc_call_t *call, ddf_dev_t *dev);
Index: uspace/lib/usbhost/include/usb/host/hcd.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/hcd.h	(revision 68e540652e175b4bfb5504f9363d31c97d4c5a17)
+++ uspace/lib/usbhost/include/usb/host/hcd.h	(revision 393302009dc835da26285d65656e166c29b4540f)
@@ -49,9 +49,9 @@
 typedef struct hcd hcd_t;
 
-typedef int (*schedule_hook_t)(hcd_t *, usb_transfer_batch_t *);
-typedef int (*ep_add_hook_t)(hcd_t *, endpoint_t *);
+typedef errno_t (*schedule_hook_t)(hcd_t *, usb_transfer_batch_t *);
+typedef errno_t (*ep_add_hook_t)(hcd_t *, endpoint_t *);
 typedef void (*ep_remove_hook_t)(hcd_t *, endpoint_t *);
 typedef void (*interrupt_hook_t)(hcd_t *, uint32_t);
-typedef int (*status_hook_t)(hcd_t *, uint32_t *);
+typedef errno_t (*status_hook_t)(hcd_t *, uint32_t *);
 
 typedef struct {
@@ -102,26 +102,26 @@
 }
 
-extern int hcd_request_address(hcd_t *, usb_speed_t, usb_address_t *);
+extern errno_t hcd_request_address(hcd_t *, usb_speed_t, usb_address_t *);
 
-extern int hcd_release_address(hcd_t *, usb_address_t);
+extern errno_t hcd_release_address(hcd_t *, usb_address_t);
 
-extern int hcd_reserve_default_address(hcd_t *, usb_speed_t);
+extern errno_t hcd_reserve_default_address(hcd_t *, usb_speed_t);
 
-static inline int hcd_release_default_address(hcd_t *hcd)
+static inline errno_t hcd_release_default_address(hcd_t *hcd)
 {
 	return hcd_release_address(hcd, USB_ADDRESS_DEFAULT);
 }
 
-extern int hcd_add_ep(hcd_t *, usb_target_t, usb_direction_t,
+extern errno_t hcd_add_ep(hcd_t *, usb_target_t, usb_direction_t,
     usb_transfer_type_t, size_t, unsigned int, size_t, usb_address_t,
     unsigned int);
 
-extern int hcd_remove_ep(hcd_t *, usb_target_t, usb_direction_t);
+extern errno_t hcd_remove_ep(hcd_t *, usb_target_t, usb_direction_t);
 
-extern int hcd_send_batch(hcd_t *, usb_target_t, usb_direction_t, void *,
+extern errno_t hcd_send_batch(hcd_t *, usb_target_t, usb_direction_t, void *,
     size_t, uint64_t, usbhc_iface_transfer_in_callback_t,
     usbhc_iface_transfer_out_callback_t, void *, const char *);
 
-extern int hcd_send_batch_sync(hcd_t *, usb_target_t, usb_direction_t,
+extern errno_t hcd_send_batch_sync(hcd_t *, usb_target_t, usb_direction_t,
     void *, size_t, uint64_t, const char *, size_t *);
 
Index: uspace/lib/usbhost/include/usb/host/usb_bus.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_bus.h	(revision 68e540652e175b4bfb5504f9363d31c97d4c5a17)
+++ uspace/lib/usbhost/include/usb/host/usb_bus.h	(revision 393302009dc835da26285d65656e166c29b4540f)
@@ -58,5 +58,5 @@
 typedef size_t (*bw_count_func_t)(usb_speed_t, usb_transfer_type_t, size_t, size_t);
 typedef void (*ep_remove_callback_t)(endpoint_t *, void *);
-typedef int (*ep_add_callback_t)(endpoint_t *, void *);
+typedef errno_t (*ep_add_callback_t)(endpoint_t *, void *);
 
 /** Endpoint management structure */
@@ -85,15 +85,15 @@
     size_t size, size_t max_packet_size);
 
-int usb_bus_init(usb_bus_t *instance,
+errno_t usb_bus_init(usb_bus_t *instance,
     size_t available_bandwidth, bw_count_func_t bw_count, usb_speed_t max_speed);
 
-int usb_bus_register_ep(usb_bus_t *instance, endpoint_t *ep, size_t data_size);
+errno_t usb_bus_register_ep(usb_bus_t *instance, endpoint_t *ep, size_t data_size);
 
-int usb_bus_unregister_ep(usb_bus_t *instance, endpoint_t *ep);
+errno_t usb_bus_unregister_ep(usb_bus_t *instance, endpoint_t *ep);
 
 endpoint_t * usb_bus_find_ep(usb_bus_t *instance,
     usb_address_t address, usb_endpoint_t ep, usb_direction_t direction);
 
-int usb_bus_add_ep(usb_bus_t *instance,
+errno_t usb_bus_add_ep(usb_bus_t *instance,
     usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
     usb_transfer_type_t type, size_t max_packet_size, unsigned packets,
@@ -101,17 +101,17 @@
     usb_address_t tt_address, unsigned tt_port);
 
-int usb_bus_remove_ep(usb_bus_t *instance,
+errno_t usb_bus_remove_ep(usb_bus_t *instance,
     usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction,
     ep_remove_callback_t callback, void *arg);
 
-int usb_bus_reset_toggle(usb_bus_t *instance, usb_target_t target, bool all);
+errno_t usb_bus_reset_toggle(usb_bus_t *instance, usb_target_t target, bool all);
 
-int usb_bus_remove_address(usb_bus_t *instance,
+errno_t usb_bus_remove_address(usb_bus_t *instance,
     usb_address_t address, ep_remove_callback_t callback, void *arg);
 
-int usb_bus_request_address(usb_bus_t *instance,
+errno_t usb_bus_request_address(usb_bus_t *instance,
     usb_address_t *address, bool strict, usb_speed_t speed);
 
-int usb_bus_get_speed(usb_bus_t *instance,
+errno_t usb_bus_get_speed(usb_bus_t *instance,
     usb_address_t address, usb_speed_t *speed);
 #endif
Index: uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 68e540652e175b4bfb5504f9363d31c97d4c5a17)
+++ uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 393302009dc835da26285d65656e166c29b4540f)
@@ -79,5 +79,5 @@
 	 * with the exception of usb_transfer_batch_finish. For external use.
 	 */
-	int error;
+	errno_t error;
 } usb_transfer_batch_t;
 
@@ -108,5 +108,5 @@
 
 void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance,
-    const void* data, size_t size, int error);
+    const void* data, size_t size, errno_t error);
 
 /** Finish batch using stored error value and transferred size.
Index: uspace/lib/usbhost/include/usb/host/utils/malloc32.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/utils/malloc32.h	(revision 68e540652e175b4bfb5504f9363d31c97d4c5a17)
+++ uspace/lib/usbhost/include/usb/host/utils/malloc32.h	(revision 393302009dc835da26285d65656e166c29b4540f)
@@ -59,5 +59,5 @@
 {
 	uintptr_t result;
-	int ret = as_get_physical_mapping(addr, &result);
+	errno_t ret = as_get_physical_mapping(addr, &result);
 	
 	if (ret != EOK)
@@ -78,5 +78,5 @@
 	size_t real_size = ALIGN_UP(size, PAGE_SIZE);
 
-	const int ret = dmamem_map_anonymous(real_size,
+	const errno_t ret = dmamem_map_anonymous(real_size,
 	    DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys,
 	    &address);
