diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1688,7 +1688,7 @@ if (kid->v_state != VDEV_STATE_HEALTHY) continue; rc = vdev_write_bootenv_impl(kid, be); - if (rv == 0) + if (rv != 0) rv = rc; }