Index: uspace/lib/drv/generic/remote_usbhc.c
===================================================================
--- uspace/lib/drv/generic/remote_usbhc.c	(revision 02fc5c403d52648f5ee6dcf5158ad19197c73795)
+++ uspace/lib/drv/generic/remote_usbhc.c	(revision ab9378b44e4fa6398d0ebc438e0bced6f97cbc29)
@@ -357,5 +357,4 @@
 	ipc_callid_t data_caller;
 	void *buffer;
-	size_t size;
 } async_transaction_t;
 
@@ -382,5 +381,4 @@
 	trans->data_caller = 0;
 	trans->buffer = NULL;
-	trans->size = 0;
 
 	return trans;
@@ -466,5 +464,5 @@
     int outcome, void *arg)
 {
-	async_transaction_t *trans = (async_transaction_t *)arg;
+	async_transaction_t *trans = arg;
 
 	async_answer_0(trans->caller, outcome);
@@ -472,5 +470,5 @@
 	async_transaction_destroy(trans);
 }
-
+/*----------------------------------------------------------------------------*/
 static void callback_in(ddf_fun_t *fun,
     int outcome, size_t actual_size, void *arg)
@@ -487,6 +485,4 @@
 	}
 
-	trans->size = actual_size;
-
 	if (trans->data_caller) {
 		async_data_read_finalize(trans->data_caller,
@@ -498,5 +494,5 @@
 	async_transaction_destroy(trans);
 }
-
+/*----------------------------------------------------------------------------*/
 void remote_usbhc_register_endpoint(ddf_fun_t *fun, void *iface,
     ipc_callid_t callid, ipc_call_t *call)
@@ -576,10 +572,11 @@
 	}
 
-	if (!async_data_read_receive(&trans->data_caller, &trans->size)) {
+	size_t size = 0;
+	if (!async_data_read_receive(&trans->data_caller, &size)) {
 		async_answer_0(callid, EPARTY);
 		return;
 	}
 
-	trans->buffer = malloc(trans->size);
+	trans->buffer = malloc(size);
 	if (trans->buffer == NULL) {
 		async_answer_0(trans->data_caller, ENOMEM);
@@ -589,5 +586,5 @@
 
 	const int rc = hc_iface->read(
-	    fun, target, setup, trans->buffer, trans->size, callback_in, trans);
+	    fun, target, setup, trans->buffer, size, callback_in, trans);
 
 	if (rc != EOK) {
@@ -597,5 +594,5 @@
 	}
 }
-
+/*----------------------------------------------------------------------------*/
 void remote_usbhc_write(
     ddf_fun_t *fun, void *iface, ipc_callid_t callid, ipc_call_t *call)
@@ -624,8 +621,9 @@
 	}
 
+	size_t size = 0;
 	if (data_buffer_len > 0) {
-		int rc = async_data_write_accept(&trans->buffer, false,
+		const int rc = async_data_write_accept(&trans->buffer, false,
 		    1, USB_MAX_PAYLOAD_SIZE,
-		    0, &trans->size);
+		    0, &size);
 
 		if (rc != EOK) {
@@ -636,6 +634,6 @@
 	}
 
-	int rc = hc_iface->write(
-	    fun, target, setup, trans->buffer, trans->size, callback_out, trans);
+	const int rc = hc_iface->write(
+	    fun, target, setup, trans->buffer, size, callback_out, trans);
 
 	if (rc != EOK) {
@@ -644,6 +642,4 @@
 	}
 }
-
-
 /**
  * @}
