Index: uspace/lib/c/generic/io/log.c
===================================================================
--- uspace/lib/c/generic/io/log.c	(revision 330a59fe7c66811911a74643fc111d0def861908)
+++ uspace/lib/c/generic/io/log.c	(revision f72ae3b5d74ccbf6f8f546b2bbadc5a85f4fb81b)
@@ -195,7 +195,12 @@
 }
 
-/** Create logging context.
- *
- * This function always returns a valid context.
+/** Create a new (sub-) log.
+ *
+ * This function always returns a valid log_t. In case of errors,
+ * @c parent is returned and errors are silently ignored.
+ *
+ * @param name Log name under which message will be reported (appended to parents name).
+ * @param parent Parent log.
+ * @return Opaque identifier of the newly created log.
  */
 log_t log_create(const char *name, log_t parent)
@@ -204,11 +209,10 @@
 	if (info == NULL)
 		return LOG_DEFAULT;
+	info->name = NULL;
 
 	if (parent == LOG_DEFAULT) {
 		info->name = str_dup(name);
-		if (info->name == NULL) {
-			free(info);
-			return LOG_DEFAULT;
-		}
+		if (info->name == NULL)
+			goto error;
 		info->top_log_id = default_top_log_id;
 	} else {
@@ -216,8 +220,6 @@
 		int rc = asprintf(&info->name, "%s/%s",
 		    parent_info->name, name);
-		if (rc < 0) {
-			free(info);
-			return LOG_DEFAULT;
-		}
+		if (rc < 0)
+			goto error;
 		info->top_log_id = parent_info->top_log_id;
 	}
@@ -245,5 +247,5 @@
 	free(info->name);
 	free(info);
-	return LOG_DEFAULT;
+	return parent;
 }
 
