Index: uspace/drv/audio/hdaudio/hdaudio.c
===================================================================
--- uspace/drv/audio/hdaudio/hdaudio.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/audio/hdaudio/hdaudio.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -151,4 +151,5 @@
 {
 	ddf_fun_t *fun_pcm = NULL;
+	bool bound = false;
 	hda_t *hda = NULL;
 	hw_res_list_parsed_t res;
@@ -299,9 +300,17 @@
 	}
 
-	ddf_fun_add_to_category(fun_pcm, "audio-pcm");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun_pcm, "audio-pcm");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function to audio-pcm category.");
+		goto error;
+	}
 
 	hw_res_list_parsed_clean(&res);
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun_pcm);
 	if (fun_pcm != NULL)
 		ddf_fun_destroy(fun_pcm);
Index: uspace/drv/block/ata_bd/main.c
===================================================================
--- uspace/drv/block/ata_bd/main.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/block/ata_bd/main.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -162,4 +162,5 @@
 	ddf_fun_t *fun = NULL;
 	ata_fun_t *afun = NULL;
+	bool bound = false;
 
 	fun_name = ata_fun_name(disk);
@@ -202,5 +203,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, "disk");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "disk");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function %s to "
+		    "category 'disk': %s", fun_name, str_error(rc));
+		goto error;
+	}
 
 	free(fun_name);
@@ -208,4 +216,6 @@
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun != NULL)
 		ddf_fun_destroy(fun);
Index: uspace/drv/block/ddisk/ddisk.c
===================================================================
--- uspace/drv/block/ddisk/ddisk.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/block/ddisk/ddisk.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -319,4 +319,5 @@
 	errno_t rc;
 	ddf_fun_t *fun = NULL;
+	bool bound = false;
 
 	fun = ddf_fun_create(ddisk->dev, fun_exposed, DDISK_FUN_NAME);
@@ -337,9 +338,18 @@
 	}
 
-	ddf_fun_add_to_category(fun, "disk");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "disk");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function %s to category "
+		    "'disk': %s.\n", DDISK_FUN_NAME, str_error(rc));
+		goto error;
+	}
 	ddisk->fun = fun;
 
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun != NULL)
 		ddf_fun_destroy(fun);
Index: uspace/drv/block/usbmast/main.c
===================================================================
--- uspace/drv/block/usbmast/main.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/block/usbmast/main.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -223,4 +223,5 @@
 	ddf_fun_t *fun = NULL;
 	usbmast_fun_t *mfun = NULL;
+	bool bound = false;
 
 	if (asprintf(&fun_name, "l%u", lun) < 0) {
@@ -299,5 +300,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, "disk");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "disk");
+	if (rc != EOK) {
+		usb_log_error("Failed to add function %s to category 'disk': %s.",
+		    fun_name, str_error(rc));
+		goto error;
+	}
 
 	free(fun_name);
@@ -308,4 +316,6 @@
 	/* Error cleanup */
 error:
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun != NULL)
 		ddf_fun_destroy(fun);
Index: uspace/drv/char/msim-con/msim-con.c
===================================================================
--- uspace/drv/char/msim-con/msim-con.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/char/msim-con/msim-con.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -85,4 +85,5 @@
 	irq_cmd_t *msim_cmds = NULL;
 	errno_t rc;
+	bool bound = false;
 
 	circ_buf_init(&con->cbuf, con->buf, msim_con_buf_size, 1);
@@ -143,5 +144,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, "console");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "console");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Error adding function 'a' to category "
+		    "'console'.");
+		goto error;
+	}
 
 	return EOK;
@@ -149,4 +157,6 @@
 	if (CAP_HANDLE_VALID(con->irq_handle))
 		async_irq_unsubscribe(con->irq_handle);
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun != NULL)
 		ddf_fun_destroy(fun);
Index: uspace/drv/char/ns8250/ns8250.c
===================================================================
--- uspace/drv/char/ns8250/ns8250.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/char/ns8250/ns8250.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -829,4 +829,5 @@
 	bool need_cleanup = false;
 	bool need_unreg_intr_handler = false;
+	bool bound = false;
 	errno_t rc;
 
@@ -909,7 +910,12 @@
 	}
 
+	bound = true;
 	ns->fun = fun;
 
-	ddf_fun_add_to_category(fun, "serial");
+	rc = ddf_fun_add_to_category(fun, "serial");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Error adding function to category 'serial'.");
+		goto fail;
+	}
 
 	ddf_msg(LVL_NOTE, "Device %s successfully initialized.",
@@ -918,4 +924,6 @@
 	return EOK;
 fail:
+	if (bound)
+		ddf_fun_unbind(fun);
 	if (fun != NULL)
 		ddf_fun_destroy(fun);
Index: uspace/drv/char/ski-con/ski-con.c
===================================================================
--- uspace/drv/char/ski-con/ski-con.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/char/ski-con/ski-con.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -112,7 +112,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, "console");
-
 	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "console");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Error adding function 'a' to category "
+		    "'console'.");
+		goto error;
+	}
 
 	fid = fibril_create(ski_con_fibril, con);
Index: uspace/drv/char/sun4v-con/sun4v-con.c
===================================================================
--- uspace/drv/char/sun4v-con/sun4v-con.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/char/sun4v-con/sun4v-con.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -74,4 +74,5 @@
 	ddf_fun_t *fun = NULL;
 	errno_t rc;
+	bool bound = false;
 
 	con->res = *res;
@@ -113,5 +114,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, "console");
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, "console");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Error adding function 'a' to category "
+		    "'console'.");
+		goto error;
+	}
 
 	return EOK;
@@ -122,4 +130,7 @@
 	if (con->output_buffer != (niagara_output_buffer_t *) AS_AREA_ANY)
 		physmem_unmap((void *) con->output_buffer);
+
+	if (bound)
+		ddf_fun_unbind(fun);
 
 	if (fun != NULL)
Index: uspace/drv/fb/amdm37x_dispc/main.c
===================================================================
--- uspace/drv/fb/amdm37x_dispc/main.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/fb/amdm37x_dispc/main.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -60,5 +60,5 @@
 	ddf_fun_t *fun = ddf_fun_create(dev, fun_exposed, "viz");
 	if (!fun) {
-		ddf_log_error("Failed to create visualizer function\n");
+		ddf_log_error("Failed to create visualizer function.");
 		return ENOMEM;
 	}
@@ -66,5 +66,5 @@
 	visualizer_t *vis = ddf_fun_data_alloc(fun, sizeof(visualizer_t));
 	if (!vis) {
-		ddf_log_error("Failed to allocate visualizer structure\n");
+		ddf_log_error("Failed to allocate visualizer structure.");
 		ddf_fun_destroy(fun);
 		return ENOMEM;
@@ -79,27 +79,36 @@
 	    ddf_dev_data_alloc(dev, sizeof(amdm37x_dispc_t));
 	if (!dispc) {
-		ddf_log_error("Failed to allocate dispc structure\n");
+		ddf_log_error("Failed to allocate dispc structure.");
 		ddf_fun_destroy(fun);
 		return ENOMEM;
 	}
 
-	errno_t ret = amdm37x_dispc_init(dispc, vis);
-	if (ret != EOK) {
-		ddf_log_error("Failed to init dispc: %s\n", str_error(ret));
+	errno_t rc = amdm37x_dispc_init(dispc, vis);
+	if (rc != EOK) {
+		ddf_log_error("Failed to init dispc: %s.", str_error(rc));
 		ddf_fun_destroy(fun);
-		return ret;
+		return rc;
 	}
 
 	/* Bind function */
-	ret = ddf_fun_bind(fun);
-	if (ret != EOK) {
-		ddf_log_error("Failed to bind function: %s\n", str_error(ret));
+	rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		ddf_log_error("Failed to bind function: %s.", str_error(rc));
 		amdm37x_dispc_fini(dispc);
 		ddf_fun_destroy(fun);
-		return ret;
+		return rc;
 	}
-	ddf_fun_add_to_category(fun, "visualizer");
 
-	ddf_log_note("Added device `%s'\n", ddf_dev_get_name(dev));
+	rc = ddf_fun_add_to_category(fun, "visualizer");
+	if (rc != EOK) {
+		ddf_log_error("Failed to add function: %s to visualizer "
+		    "category.", str_error(rc));
+		amdm37x_dispc_fini(dispc);
+		ddf_fun_unbind(fun);
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+
+	ddf_log_note("Added device `%s'", ddf_dev_get_name(dev));
 	return EOK;
 }
Index: uspace/drv/fb/kfb/port.c
===================================================================
--- uspace/drv/fb/kfb/port.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/fb/kfb/port.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -348,5 +348,12 @@
 
 	vs->reg_svc_handle = ddf_fun_get_handle(fun_vs);
-	ddf_fun_add_to_category(fun_vs, "visualizer");
+	rc = ddf_fun_add_to_category(fun_vs, "visualizer");
+	if (rc != EOK) {
+		list_remove(&pixel_mode.link);
+		ddf_fun_unbind(fun_vs);
+		ddf_fun_destroy(fun_vs);
+		as_area_destroy(kfb.addr);
+		return rc;
+	}
 
 	return EOK;
Index: uspace/drv/intctl/apic/apic.c
===================================================================
--- uspace/drv/intctl/apic/apic.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/intctl/apic/apic.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -212,4 +212,5 @@
 	void *regs;
 	errno_t rc;
+	bool bound = false;
 
 	if ((sysinfo_get_value("apic", &have_apic) != EOK) || (!have_apic)) {
@@ -241,4 +242,6 @@
 	}
 
+	bound = true;
+
 	rc = ddf_fun_add_to_category(fun_a, "irc");
 	if (rc != EOK)
@@ -247,4 +250,6 @@
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun_a);
 	if (fun_a != NULL)
 		ddf_fun_destroy(fun_a);
Index: uspace/drv/intctl/i8259/i8259.c
===================================================================
--- uspace/drv/intctl/i8259/i8259.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/intctl/i8259/i8259.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -142,4 +142,5 @@
 	ddf_fun_t *fun_a = NULL;
 	errno_t rc;
+	bool bound = false;
 
 	if ((sysinfo_get_value("i8259", &have_i8259) != EOK) || (!have_i8259)) {
@@ -174,4 +175,6 @@
 	}
 
+	bound = true;
+
 	rc = ddf_fun_add_to_category(fun_a, "irc");
 	if (rc != EOK)
@@ -180,4 +183,6 @@
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun_a);
 	if (fun_a != NULL)
 		ddf_fun_destroy(fun_a);
Index: uspace/drv/intctl/icp-ic/icp-ic.c
===================================================================
--- uspace/drv/intctl/icp-ic/icp-ic.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/intctl/icp-ic/icp-ic.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -116,4 +116,5 @@
 	void *regs;
 	errno_t rc;
+	bool bound = false;
 
 	rc = pio_enable((void *)res->base, sizeof(icpic_regs_t), &regs);
@@ -146,4 +147,6 @@
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun_a);
 	if (fun_a != NULL)
 		ddf_fun_destroy(fun_a);
Index: uspace/drv/intctl/obio/obio.c
===================================================================
--- uspace/drv/intctl/obio/obio.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/intctl/obio/obio.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -118,4 +118,5 @@
 	ddf_fun_t *fun_a = NULL;
 	errno_t rc;
+	bool bound = false;
 
 	rc = pio_enable((void *)res->base, OBIO_SIZE, (void **) &obio->regs);
@@ -149,4 +150,6 @@
 	return EOK;
 error:
+	if (bound)
+		ddf_fun_unbind(fun_a);
 	if (fun_a != NULL)
 		ddf_fun_destroy(fun_a);
Index: uspace/drv/test/test1/test1.c
===================================================================
--- uspace/drv/test/test1/test1.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/test/test1/test1.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -176,5 +176,12 @@
 	}
 
-	ddf_fun_add_to_category(fun_a, "virtual");
+	rc = ddf_fun_add_to_category(fun_a, "virtual");
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function 'a' to category "
+		    "'virtual'.");
+		ddf_fun_unbind(fun_a);
+		ddf_fun_destroy(fun_a);
+		goto error;
+	}
 
 	if (str_cmp(dev_name, "test1") == 0) {
Index: uspace/drv/test/test2/test2.c
===================================================================
--- uspace/drv/test/test2/test2.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/test/test2/test2.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -140,9 +140,18 @@
 	rc = ddf_fun_bind(fun_a);
 	if (rc != EOK) {
+		ddf_fun_destroy(fun_a);
 		ddf_msg(LVL_ERROR, "Failed binding function 'a'.");
 		return rc;
 	}
 
-	ddf_fun_add_to_category(fun_a, "virtual");
+	rc = ddf_fun_add_to_category(fun_a, "virtual");
+	if (rc != EOK) {
+		ddf_fun_unbind(fun_a);
+		ddf_fun_destroy(fun_a);
+		ddf_msg(LVL_ERROR, "Failed adding function 'a' to category "
+		    "'virtual'.");
+		return rc;
+	}
+
 	test2->fun_a = fun_a;
 
Index: uspace/drv/test/test3/test3.c
===================================================================
--- uspace/drv/test/test3/test3.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/test/test3/test3.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -70,4 +70,5 @@
 	errno_t rc;
 	char *fun_name = NULL;
+	bool bound = false;
 
 	if (asprintf(&fun_name, "%s%zu", base_name, index) < 0) {
@@ -91,5 +92,12 @@
 	}
 
-	ddf_fun_add_to_category(fun, class_name);
+	bound = true;
+
+	rc = ddf_fun_add_to_category(fun, class_name);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed addning function %s to category %s: "
+		    "%s", fun_name, class_name, str_error(rc));
+		goto leave;
+	}
 
 	ddf_msg(LVL_NOTE, "Registered exposed function `%s'.", fun_name);
@@ -98,4 +106,6 @@
 	free(fun_name);
 
+	if (bound)
+		ddf_fun_unbind(fun);
 	if ((rc != EOK) && (fun != NULL)) {
 		ddf_fun_destroy(fun);
Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -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;
Index: uspace/lib/ieee80211/src/ieee80211.c
===================================================================
--- uspace/lib/ieee80211/src/ieee80211.c	(revision de9a18e087fc024984f3c2000f77bc68fb593b76)
+++ uspace/lib/ieee80211/src/ieee80211.c	(revision ca4c5596d25d61385c705f462b32f0bdef2c681b)
@@ -803,4 +803,5 @@
 	if (rc != EOK) {
 		ddf_fun_unbind(fun);
+		ddf_fun_destroy(fun);
 		return rc;
 	}
@@ -809,4 +810,5 @@
 	if (rc != EOK) {
 		ddf_fun_unbind(fun);
+		ddf_fun_destroy(fun);
 		return rc;
 	}
