Index: uspace/lib/display/src/display.c
===================================================================
--- uspace/lib/display/src/display.c	(revision 9901f267fac70e209d0629a3ceaef9c8a6e15fa6)
+++ uspace/lib/display/src/display.c	(revision fc4abcaefa9a26ceb2de3a504ef4a4ef4e39e201)
@@ -218,4 +218,5 @@
  * @param window Window
  * @param rgc Place to store pointer to new graphics context
+ * @return EOK on success or an error code
  */
 errno_t display_window_get_gc(display_window_t *window, gfx_context_t **rgc)
@@ -227,8 +228,8 @@
 
 	exch = async_exchange_begin(window->display->sess);
-	sess = async_connect_me_to(exch, INTERFACE_GC, 0, window->id);
+	sess = async_connect_me_to(exch, INTERFACE_GC, 0, window->id, &rc);
 	if (sess == NULL) {
 		async_exchange_end(exch);
-		return EIO;
+		return rc;
 	}
 
