Log an error if the target has unknown target type, or zero length.
--- diff/drivers/md/dm-table.c	2004-04-07 11:30:08.253501632 +0100
+++ source/drivers/md/dm-table.c	2004-04-07 11:32:28.916117664 +0100
@@ -663,12 +663,14 @@ int dm_table_add_target(struct dm_table 
 
 	if (!len) {
 		tgt->error = "zero-length target";
+		DMERR(": %s\n", tgt->error);
 		return -EINVAL;
 	}
 
 	tgt->type = dm_get_target_type(type);
 	if (!tgt->type) {
 		tgt->error = "unknown target type";
+		DMERR(": %s\n", tgt->error);
 		return -EINVAL;
 	}
 
@@ -705,7 +707,7 @@ int dm_table_add_target(struct dm_table 
 	return 0;
 
  bad:
-	printk(KERN_ERR DM_NAME ": %s\n", tgt->error);
+	DMERR(": %s\n", tgt->error);
 	dm_put_target_type(tgt->type);
 	return r;
 }
