Index: uspace/drv/bus/usb/ehci/ehci_batch.c
===================================================================
--- uspace/drv/bus/usb/ehci/ehci_batch.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ehci/ehci_batch.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -205,8 +205,8 @@
 			    -= td_remain_size(&ehci_batch->tds[i]);
 		} else {
-			usb_log_debug("Batch %p found error TD(%zu):%08x (%d).",
+			usb_log_debug("Batch %p found error TD(%zu):%08x: %s.",
 			    ehci_batch, i,
 			    ehci_batch->tds[i].status,
-			    ehci_batch->base.error);
+			    str_error_name(ehci_batch->base.error));
 			/* Clear possible ED HALT */
 			qh_clear_halt(ehci_batch->qh);
Index: uspace/drv/bus/usb/ehci/hc.c
===================================================================
--- uspace/drv/bus/usb/ehci/hc.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ehci/hc.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -95,7 +95,9 @@
  * @param[in] hw_res Device's resources.
  *
+ * @param[out] irq
+ *
  * @return Error code.
  */
-int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
+int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	assert(code);
@@ -138,5 +140,6 @@
 	    RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
 
-	return hw_res->irqs.irqs[0];
+	*irq = hw_res->irqs.irqs[0];
+	return EOK;
 }
 
Index: uspace/drv/bus/usb/ehci/hc.h
===================================================================
--- uspace/drv/bus/usb/ehci/hc.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ehci/hc.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -103,5 +103,5 @@
 extern int hc_start(hc_device_t *);
 extern int hc_setup_roothub(hc_device_t *);
-extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *);
+extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
 extern int hc_gone(hc_device_t *);
 
Index: uspace/drv/bus/usb/ohci/hc.c
===================================================================
--- uspace/drv/bus/usb/ohci/hc.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ohci/hc.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -102,5 +102,5 @@
  * @return Error code.
  */
-int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
+int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	assert(code);
@@ -140,5 +140,6 @@
 	    RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
 
-	return hw_res->irqs.irqs[0];
+	*irq = hw_res->irqs.irqs[0];
+	return EOK;
 }
 
Index: uspace/drv/bus/usb/ohci/hc.h
===================================================================
--- uspace/drv/bus/usb/ohci/hc.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ohci/hc.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -90,5 +90,5 @@
 
 extern int hc_add(hc_device_t *, const hw_res_list_parsed_t *);
-extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *);
+extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
 extern int hc_gain_control(hc_device_t *);
 extern int hc_start(hc_device_t *);
Index: uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -54,5 +54,5 @@
 };
 
-inline static unsigned int cc_to_rc(unsigned int cc)
+inline static int cc_to_rc(unsigned int cc)
 {
 	switch (cc) {
Index: uspace/drv/bus/usb/ohci/hw_struct/hcca.h
===================================================================
--- uspace/drv/bus/usb/ohci/hw_struct/hcca.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/ohci/hw_struct/hcca.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -37,5 +37,5 @@
 #define DRV_OHCI_HW_STRUCT_HCCA_H
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdint.h>
 #include <macros.h>
Index: uspace/drv/bus/usb/uhci/hc.c
===================================================================
--- uspace/drv/bus/usb/uhci/hc.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/uhci/hc.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -106,8 +106,9 @@
  * @param[out] code IRQ code structure.
  * @param[in] hw_res Device's resources.
+ * @param[out] irq
  *
  * @return Error code.
  */
-int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
+int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	assert(code);
@@ -145,5 +146,6 @@
 	    RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
 
-	return hw_res->irqs.irqs[0];
+	*irq = hw_res->irqs.irqs[0];
+	return EOK;
 }
 
Index: uspace/drv/bus/usb/uhci/hc.h
===================================================================
--- uspace/drv/bus/usb/uhci/hc.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/uhci/hc.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -158,5 +158,5 @@
 
 extern int hc_add(hc_device_t *, const hw_res_list_parsed_t *);
-extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *);
+extern int hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
 extern int hc_start(hc_device_t *);
 extern int hc_setup_roothub(hc_device_t *);
Index: uspace/drv/bus/usb/usbmid/usbmid.c
===================================================================
--- uspace/drv/bus/usb/usbmid/usbmid.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/usbmid/usbmid.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -120,8 +120,8 @@
 	 * class name something humanly understandable.
 	 */
-	rc = asprintf(&child_name, "%s%hhu",
+	int ret = asprintf(&child_name, "%s%hhu",
 	    usb_str_class(interface_descriptor->interface_class),
 	    interface_descriptor->interface_number);
-	if (rc < 0) {
+	if (ret < 0) {
 		return ENOMEM;
 	}
Index: uspace/drv/bus/usb/vhc/conndev.c
===================================================================
--- uspace/drv/bus/usb/vhc/conndev.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/vhc/conndev.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -75,6 +75,6 @@
 	}
 	
-	sysarg_t data_request_rc;
-	sysarg_t opening_request_rc;
+	int data_request_rc;
+	int opening_request_rc;
 	async_wait_for(data_request, &data_request_rc);
 	async_wait_for(opening_request, &opening_request_rc);
Index: uspace/drv/bus/usb/xhci/hc.c
===================================================================
--- uspace/drv/bus/usb/xhci/hc.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/xhci/hc.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -369,5 +369,5 @@
  * (except 0) are disabled.
  */
-int hc_irq_code_gen(irq_code_t *code, xhci_hc_t *hc, const hw_res_list_parsed_t *hw_res)
+int hc_irq_code_gen(irq_code_t *code, xhci_hc_t *hc, const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	assert(code);
@@ -412,5 +412,6 @@
 	code->cmds[6].addr = intr0_iman;
 
-	return hw_res->irqs.irqs[0];
+        *irq = hw_res->irqs.irqs[0];
+        return EOK;
 }
 
Index: uspace/drv/bus/usb/xhci/hc.h
===================================================================
--- uspace/drv/bus/usb/xhci/hc.h	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/xhci/hc.h	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -117,5 +117,5 @@
 extern int hc_init_memory(xhci_hc_t *, ddf_dev_t *);
 extern int hc_claim(xhci_hc_t *, ddf_dev_t *);
-extern int hc_irq_code_gen(irq_code_t *, xhci_hc_t *, const hw_res_list_parsed_t *);
+extern int hc_irq_code_gen(irq_code_t *, xhci_hc_t *, const hw_res_list_parsed_t *, int *);
 extern int hc_start(xhci_hc_t *, bool);
 extern void hc_fini(xhci_hc_t *);
Index: uspace/drv/bus/usb/xhci/main.c
===================================================================
--- uspace/drv/bus/usb/xhci/main.c	(revision 8bfb163a292928c29839d774b30ca9d0d0ee385e)
+++ uspace/drv/bus/usb/xhci/main.c	(revision 132ab5d1e75253f9bae910b2748a4c13efe7e71f)
@@ -68,8 +68,8 @@
 }
 
-static int hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
+static int hcd_irq_code_gen(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
 {
 	xhci_hc_t *hc = hcd_to_hc(hcd);
-	return hc_irq_code_gen(code, hc, hw_res);
+	return hc_irq_code_gen(code, hc, hw_res, irq);
 }
 
