Index: uspace/drv/nic/virtio-net/virtio-net.c
===================================================================
--- uspace/drv/nic/virtio-net/virtio-net.c	(revision e2f332c127e4796fcd23ccc95bc1a73d254f3303)
+++ uspace/drv/nic/virtio-net/virtio-net.c	(revision 8fed3efa3f7941fe16c62db0eb7b013757e1a179)
@@ -211,4 +211,5 @@
 		ddf_msg(LVL_NOTE, "Unsupported number of virtqueues: %u",
 		    num_queues);
+		rc = ELIMIT;
 		goto fail;
 	}
@@ -404,5 +405,5 @@
 	if (fun == NULL) {
 		rc = ENOMEM;
-		goto error;
+		goto uninitialize;
 	}
 	nic_t *nic = ddf_dev_data_get(dev);
@@ -418,5 +419,5 @@
 	if (rc != EOK) {
 		ddf_msg(LVL_ERROR, "Failed binding device function");
-		goto uninitialize;
+		goto destroy;
 	}
 
@@ -434,7 +435,8 @@
 unbind:
 	ddf_fun_unbind(fun);
+destroy:
+	ddf_fun_destroy(fun);
 uninitialize:
 	virtio_net_uninitialize(dev);
-error:
 	return rc;
 }
