diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index 6579c22f606..3c5f552a935 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -215,7 +215,7 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (error != 0) { + if (error == 0) { if (validate_setup()) { error = apply_changes(&mesh); } else {