Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/isa/isa.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -341,5 +341,5 @@
 	}
 
-	val = skip_spaces(end);	
+	val = skip_spaces(end);
 	get_match_id(&id, val);
 	if (id == NULL) {
Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/ns8250/ns8250.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -133,4 +133,5 @@
 static void ns8250_delete(ns8250_t *ns)
 {
+	assert(ns != NULL);
 	free(ns);
 }
@@ -405,5 +406,5 @@
  */
 static inline void ns8250_port_interrupts_enable(ioport8_t *port)
-{	
+{
 	pio_write_8(port + 1, 0x1);	/* Interrupt when data received. */
 	pio_write_8(port + 4, 0xB);
@@ -803,5 +804,5 @@
 	}
 	fibril_mutex_unlock(&data->mutex);
-
+	
 	return res;
 }
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);
 }
 
Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/root/root.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -148,5 +148,5 @@
 	printf(NAME ": root_add_device, device handle=%" PRIun "\n",
 	    dev->handle);
-	
+
 	/*
 	 * Register virtual devices root.
@@ -160,5 +160,5 @@
 	if (EOK != res)
 		printf(NAME ": failed to add child device for platform.\n");
-	
+
 	return res;
 }
Index: uspace/drv/rootvirt/rootvirt.c
===================================================================
--- uspace/drv/rootvirt/rootvirt.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/rootvirt/rootvirt.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -110,5 +110,5 @@
 
 	printf(NAME ": add_device(handle=%d)\n", (int)dev->handle);
-	
+
 	/*
 	 * Go through all virtual functions and try to add them.
Index: uspace/drv/test1/test1.c
===================================================================
--- uspace/drv/test1/test1.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/test1/test1.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -36,11 +36,11 @@
 #include "test1.h"
 
-static int add_device(device_t *dev);
+static int test1_add_device(device_t *dev);
 
 static driver_ops_t driver_ops = {
-	.add_device = &add_device
+	.add_device = &test1_add_device
 };
 
-static driver_t the_driver = {
+static driver_t test1_driver = {
 	.name = NAME,
 	.driver_ops = &driver_ops
@@ -55,5 +55,5 @@
  * @param score Device match score.
  */
-static void register_child_verbose(device_t *parent, const char *message,
+static void register_fun_verbose(device_t *parent, const char *message,
     const char *name, const char *match_id, int match_score)
 {
@@ -89,5 +89,5 @@
  * @return Error code reporting success of the operation.
  */
-static int add_device(device_t *dev)
+static int test1_add_device(device_t *dev)
 {
 	function_t *fun_a;
@@ -108,8 +108,8 @@
 		add_function_to_class(fun_a, "virt-null");
 	} else if (str_cmp(dev->name, "test1") == 0) {
-		register_child_verbose(dev, "cloning myself ;-)", "clone",
+		register_fun_verbose(dev, "cloning myself ;-)", "clone",
 		    "virtual&test1", 10);
 	} else if (str_cmp(dev->name, "clone") == 0) {
-		register_child_verbose(dev, "run by the same task", "child",
+		register_fun_verbose(dev, "run by the same task", "child",
 		    "virtual&test1&child", 10);
 	}
@@ -123,5 +123,5 @@
 {
 	printf(NAME ": HelenOS test1 virtual device driver\n");
-	return driver_main(&the_driver);
+	return driver_main(&test1_driver);
 }
 
Index: uspace/drv/test2/test2.c
===================================================================
--- uspace/drv/test2/test2.c	(revision 68414f4a1f1b548a47a6b4525bd18dfbed67df1d)
+++ uspace/drv/test2/test2.c	(revision bab63886b1d1a9c8c49900dc50c39ee2b0c64763)
@@ -38,11 +38,11 @@
 #define NAME "test2"
 
-static int add_device(device_t *dev);
+static int test2_add_device(device_t *dev);
 
 static driver_ops_t driver_ops = {
-	.add_device = &add_device
+	.add_device = &test2_add_device
 };
 
-static driver_t the_driver = {
+static driver_t test2_driver = {
 	.name = NAME,
 	.driver_ops = &driver_ops
@@ -102,7 +102,7 @@
 }
 
-static int add_device(device_t *dev)
+static int test2_add_device(device_t *dev)
 {
-	printf(NAME ": add_device(name=\"%s\", handle=%d)\n",
+	printf(NAME ": test2_add_device(name=\"%s\", handle=%d)\n",
 	    dev->name, (int) dev->handle);
 
@@ -125,5 +125,5 @@
 {
 	printf(NAME ": HelenOS test2 virtual device driver\n");
-	return driver_main(&the_driver);
+	return driver_main(&test2_driver);
 }
 
