Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/pciintel/pci.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -111,10 +111,9 @@
 	pci_bus_t *bus;
 	
-	bus = (pci_bus_t *) malloc(sizeof(pci_bus_t));
-	if (bus != NULL) {
-		memset(bus, 0, sizeof(pci_bus_t));
-		fibril_mutex_initialize(&bus->conf_mutex);
-	}
-
+	bus = (pci_bus_t *) calloc(1, sizeof(pci_bus_t));
+	if (bus == NULL)
+		return NULL;
+	
+	fibril_mutex_initialize(&bus->conf_mutex);
 	return bus;
 }
@@ -122,4 +121,5 @@
 static void pci_bus_delete(pci_bus_t *bus)
 {
+	assert(bus != NULL);
 	free(bus);
 }
@@ -228,5 +228,5 @@
 		add_match_id(&fun->fnode->match_ids, match_id);
 	}
-
+	
 	/* TODO add more ids (with subsys ids, using class id etc.) */
 }
@@ -266,5 +266,5 @@
  */
 int pci_read_bar(pci_fun_t *fun, int addr)
-{	
+{
 	/* Value of the BAR */
 	uint32_t val, mask;
@@ -369,5 +369,5 @@
 	bool multi;
 	uint8_t header_type;
-
+	
 	/* We need this early, before registering. */
 	fun->fnode = fnode;
@@ -485,5 +485,5 @@
 		async_hangup(dnode->parent_phone);
 		return rc;
-	}	
+	}
 	
 	printf(NAME ": conf_addr = %" PRIx64 ".\n",
@@ -531,8 +531,7 @@
 pci_fun_t *pci_fun_new(void)
 {
-	pci_fun_t *res = (pci_fun_t *) malloc(sizeof(pci_fun_t));
-	
-	if (res != NULL)
-		memset(res, 0, sizeof(pci_fun_t));
+	pci_fun_t *res;
+	
+	res = (pci_fun_t *) calloc(1, sizeof(pci_fun_t));
 	return res;
 }
@@ -547,8 +546,7 @@
 void pci_fun_delete(pci_fun_t *fun)
 {
-	if (fun != NULL) {
-		hw_res_clean_resource_list(&fun->hw_resources);
-		free(fun);
-	}
+	assert(fun != NULL);
+	hw_res_clean_resource_list(&fun->hw_resources);
+	free(fun);
 }
 
