summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
diff options
context:
space:
mode:
authorhaad <haad@NetBSD.org>2008-12-21 00:53:27 +0000
committerhaad <haad@NetBSD.org>2008-12-21 00:53:27 +0000
commit38805eb14c9a24414515ec80d28fc16ff67c9c41 (patch)
treea8dcc86240032eb14b36f45fb37be47934f1439d /sys/dev/dm/dm_ioctl.c
parentdab49f36c7fb227bb221ff91a339c1142cc7befd (diff)
Fix error path in target_init call. When initializing target fails i have
to release table before I try to destroy it and I haveto unbusy device, too.
Diffstat (limited to 'sys/dev/dm/dm_ioctl.c')
-rw-r--r--sys/dev/dm/dm_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/dm/dm_ioctl.c b/sys/dev/dm/dm_ioctl.c
index 43d81907ff3..f2f138b91e9 100644
--- a/sys/dev/dm/dm_ioctl.c
+++ b/sys/dev/dm/dm_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_ioctl.c,v 1.3 2008/12/19 16:30:41 haad Exp $ */
+/* $NetBSD: dm_ioctl.c,v 1.4 2008/12/21 00:53:27 haad Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -768,9 +768,11 @@ dm_table_load_ioctl(prop_dictionary_t dm_dict)
if ((ret = target->init(dmv, &table_en->target_config,
str)) != 0) {
+ dm_table_release(&dmv->table_head, DM_TABLE_INACTIVE);
dm_table_destroy(&dmv->table_head, DM_TABLE_INACTIVE);
free(str, M_TEMP);
-
+
+ dm_dev_unbusy(dmv);
return ret;
}