Index: uspace/drv/block/usbmast/main.c
===================================================================
--- uspace/drv/block/usbmast/main.c	(revision 09ab0a9afc9379f1604c0fd75cac2d9287ba022c)
+++ uspace/drv/block/usbmast/main.c	(revision f31ca47c3a2e8e8b96553c4ba9c283f56e0dceba)
@@ -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);
