Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision 5e904dd96dee1c572274ce3575461b77af422534)
+++ kernel/generic/src/ipc/ipc.c	(revision 1b6477e9b3e1882753cf68254b8c679a3e1ce05b)
@@ -230,6 +230,7 @@
 	}
 
-	call_t *answer = ipc_wait_for_call(mybox, SYNCH_NO_TIMEOUT,
-	    SYNCH_FLAGS_INTERRUPTIBLE);
+	call_t *answer = NULL;
+	(void) ipc_wait_for_call(mybox, SYNCH_NO_TIMEOUT,
+	    SYNCH_FLAGS_INTERRUPTIBLE, &answer);
 	if (!answer) {
 
@@ -267,6 +268,6 @@
 			 * now.
 			 */
-			answer = ipc_wait_for_call(mybox, SYNCH_NO_TIMEOUT,
-			    SYNCH_FLAGS_NONE);
+			(void) ipc_wait_for_call(mybox, SYNCH_NO_TIMEOUT,
+			    SYNCH_FLAGS_NONE, &answer);
 		}
 	}
@@ -536,11 +537,14 @@
  *              waitq_sleep_timeout() for description of its special
  *              meaning.
- *
- * @return Recived call structure or NULL.
+ * @param call  Received call structure or NULL.
+ *
+ * @return Error code from waitq_sleep_timeout.
+ *         ENOENT if sleep returns successfully, but there is no call.
  *
  * To distinguish between a call and an answer, have a look at call->flags.
  *
  */
-call_t *ipc_wait_for_call(answerbox_t *box, uint32_t usec, unsigned int flags)
+errno_t ipc_wait_for_call(answerbox_t *box, uint32_t usec, unsigned int flags,
+    call_t **call)
 {
 	call_t *request;
@@ -552,5 +556,5 @@
 	rc = waitq_sleep_timeout(&box->wq, usec, flags, NULL);
 	if (rc != EOK)
-		return NULL;
+		return rc;
 
 	irq_spinlock_lock(&box->lock, true);
@@ -594,5 +598,5 @@
 		 */
 		irq_spinlock_unlock(&box->lock, true);
-		return NULL;
+		return ENOENT;
 	}
 
@@ -605,5 +609,6 @@
 	irq_spinlock_unlock(&TASK->lock, true);
 
-	return request;
+	*call = request;
+	return EOK;
 }
 
@@ -779,6 +784,9 @@
 {
 	while (atomic_get(&TASK->answerbox.active_calls) != 0) {
-		call_t *call = ipc_wait_for_call(&TASK->answerbox,
-		    SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE);
+		call_t *call = NULL;
+		if (ipc_wait_for_call(&TASK->answerbox,
+		    SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE, &call) == ENOENT)
+			continue;
+		assert(call);
 		assert(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
 
Index: kernel/generic/src/ipc/kbox.c
===================================================================
--- kernel/generic/src/ipc/kbox.c	(revision 5e904dd96dee1c572274ce3575461b77af422534)
+++ kernel/generic/src/ipc/kbox.c	(revision 1b6477e9b3e1882753cf68254b8c679a3e1ce05b)
@@ -168,6 +168,7 @@
 
 	while (!done) {
-		call_t *call = ipc_wait_for_call(&TASK->kb.box, SYNCH_NO_TIMEOUT,
-		    SYNCH_FLAGS_NONE);
+		call_t *call = NULL;
+		(void) ipc_wait_for_call(&TASK->kb.box, SYNCH_NO_TIMEOUT,
+		    SYNCH_FLAGS_NONE, &call);
 
 		if (call == NULL)
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision 5e904dd96dee1c572274ce3575461b77af422534)
+++ kernel/generic/src/ipc/sysipc.c	(revision 1b6477e9b3e1882753cf68254b8c679a3e1ce05b)
@@ -751,5 +751,5 @@
     unsigned int flags)
 {
-	call_t *call;
+	call_t *call = NULL;
 
 restart:
@@ -759,6 +759,6 @@
 #endif
 
-	call = ipc_wait_for_call(&TASK->answerbox, usec,
-	    flags | SYNCH_FLAGS_INTERRUPTIBLE);
+	errno_t rc = ipc_wait_for_call(&TASK->answerbox, usec,
+	    flags | SYNCH_FLAGS_INTERRUPTIBLE, &call);
 
 #ifdef CONFIG_UDEBUG
@@ -766,10 +766,8 @@
 #endif
 
-	if (!call) {
-		ipc_data_t data = { };
-		data.cap_handle = CAP_NIL;
-		STRUCT_TO_USPACE(calldata, &data);
-		return EOK;
-	}
+	if (rc != EOK)
+		return rc;
+
+	assert(call);
 
 	call->data.flags = call->flags;
@@ -806,5 +804,5 @@
 
 	cap_handle_t handle = CAP_NIL;
-	errno_t rc = cap_alloc(TASK, &handle);
+	rc = cap_alloc(TASK, &handle);
 	if (rc != EOK) {
 		goto error;
