usr/src/uts/common/fs/zfs/spa.c
changeset 4070 4390ea390a1e
parent 3975 6674f5d79069
child 4178 ad95fd86760b
--- a/usr/src/uts/common/fs/zfs/spa.c	Thu Apr 19 15:01:50 2007 -0700
+++ b/usr/src/uts/common/fs/zfs/spa.c	Thu Apr 19 15:50:31 2007 -0700
@@ -484,10 +484,9 @@
 	/*
 	 * Try to open all vdevs, loading each label in the process.
 	 */
-	if (vdev_open(rvd) != 0) {
-		error = ENXIO;
+	error = vdev_open(rvd);
+	if (error != 0)
 		goto out;
-	}
 
 	/*
 	 * Validate the labels for all leaf vdevs.  We need to grab the config
@@ -498,10 +497,8 @@
 	error = vdev_validate(rvd);
 	spa_config_exit(spa, FTAG);
 
-	if (error != 0) {
-		error = EBADF;
+	if (error != 0)
 		goto out;
-	}
 
 	if (rvd->vdev_state <= VDEV_STATE_CANT_OPEN) {
 		error = ENXIO;