Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 09ab0a9afc9379f1604c0fd75cac2d9287ba022c)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 4f38ad778b01a722043e92db4cc6d662d2d7d7ec)
@@ -588,4 +588,5 @@
 	errno_t rc;
 	bool need_cleanup = false;
+	bool bound = false;
 
 	ddf_msg(LVL_DEBUG, "rtc_dev_add %s (handle = %d)",
@@ -624,7 +625,12 @@
 	}
 
+	bound = true;
 	rtc->fun = fun;
 
-	ddf_fun_add_to_category(fun, "clock");
+	rc = ddf_fun_add_to_category(fun, "clock");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding service to clock category.");
+		goto error;
+	}
 
 	ddf_msg(LVL_NOTE, "Device %s successfully initialized",
@@ -634,4 +640,6 @@
 
 error:
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun)
 		ddf_fun_destroy(fun);
@@ -754,6 +762,8 @@
 
 	rc = ddf_fun_online(fun);
-	if (rc == EOK)
-		ddf_fun_add_to_category(fun, "clock");
+	if (rc == EOK) {
+		// XXX This should be probably handled by the framework
+		rc = ddf_fun_add_to_category(fun, "clock");
+	}
 
 	return rc;
