Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision df147c7b4922ea53246e4777ccd2ff6309ec4c7d)
+++ uspace/srv/devman/main.c	(revision eea1dd55e00e29f2a361326fef42a3342b4cec2f)
@@ -477,5 +477,11 @@
 		dev = fun->dev;
 
-	if (fun == NULL && dev == NULL) {
+	/*
+	 * For a valid function to connect to we need a device. The root
+	 * function, for example, has no device and cannot be connected to.
+	 * This means @c dev needs to be valid regardless whether we are
+	 * connecting to a device or to a function.
+	 */
+	if (dev == NULL) {
 		printf(NAME ": devman_forward error - no device or function with "
 		    "handle %" PRIun " was found.\n", handle);
