From 741a166f3ce8bcdc76925041f337ae63ef577c87 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 9 Aug 2023 13:19:08 +0200 Subject: [PATCH] debug: use common error exit path --- tools/lvconvert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 785d8816f..d25791fb0 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -6302,7 +6302,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd, if (!_writecache_zero(cmd, lv_fast)) { log_error("LV %s could not be zeroed.", display_lvname(lv_fast)); - return ECMD_FAILED; + goto bad; } /* @@ -6312,10 +6312,10 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd, */ if (dm_snprintf(cvol_name, sizeof(cvol_name), "%s_cvol", lv_fast->name) < 0) { log_error("Can't prepare new metadata name for %s.", display_lvname(lv_fast)); - return ECMD_FAILED; + goto bad; } if (!lv_rename_update(cmd, lv_fast, cvol_name, 0)) - return_ECMD_FAILED; + goto_bad; lv_fast->status |= LV_CACHE_VOL;