Index: uspace/drv/bus/usb/ohci/ohci_batch.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_batch.c	(revision bfff7fd57f2e4cc25a8bbb2950c9cf594c5ddd21)
+++ uspace/drv/bus/usb/ohci/ohci_batch.c	(revision 584aa3859d3a224c8fc52c485b985086a22d55fe)
@@ -97,15 +97,11 @@
 {
 	assert(usb_batch);
-#define CHECK_NULL_DISPOSE_RET(ptr, message...) \
-if (ptr == NULL) { \
-	usb_log_error(message); \
-	ohci_transfer_batch_dispose(ohci_batch); \
-	return NULL; \
-} else (void)0
 
 	ohci_transfer_batch_t *ohci_batch =
 	    calloc(1, sizeof(ohci_transfer_batch_t));
-	CHECK_NULL_DISPOSE_RET(ohci_batch,
-	    "Failed to allocate OHCI batch data.\n");
+	if (!ohci_batch) {
+		usb_log_error("Failed to allocate OHCI batch data.");
+		goto dispose;
+	}
 	link_initialize(&ohci_batch->link);
 	ohci_batch->td_count =
@@ -119,6 +115,8 @@
 	/* We need an extra place for TD that was left at ED */
 	ohci_batch->tds = calloc(ohci_batch->td_count + 1, sizeof(td_t*));
-	CHECK_NULL_DISPOSE_RET(ohci_batch->tds,
-	    "Failed to allocate OHCI transfer descriptors.\n");
+	if (!ohci_batch->tds) {
+		usb_log_error("Failed to allocate OHCI transfer descriptors.");
+		goto dispose;
+	}
 
 	/* Add TD left over by the previous transfer */
@@ -128,6 +126,8 @@
 	for (unsigned i = 1; i <= ohci_batch->td_count; ++i) {
 		ohci_batch->tds[i] = malloc32(sizeof(td_t));
-		CHECK_NULL_DISPOSE_RET(ohci_batch->tds[i],
-		    "Failed to allocate TD %d.\n", i );
+		if (!ohci_batch->tds[i]) {
+			usb_log_error("Failed to allocate TD %d.", i);
+			goto dispose;
+		}
 	}
 
@@ -141,6 +141,8 @@
 		ohci_batch->device_buffer =
 		    malloc32(usb_batch->setup_size + usb_batch->buffer_size);
-                CHECK_NULL_DISPOSE_RET(ohci_batch->device_buffer,
-                    "Failed to allocate device accessible buffer.\n");
+		if (!ohci_batch->device_buffer) {
+			usb_log_error("Failed to allocate device buffer");
+			goto dispose;
+		}
 		/* Copy setup data */
                 memcpy(ohci_batch->device_buffer, usb_batch->setup_buffer,
@@ -159,5 +161,7 @@
 
 	return ohci_batch;
-#undef CHECK_NULL_DISPOSE_RET
+dispose:
+	ohci_transfer_batch_dispose(ohci_batch);
+	return NULL;
 }
 
