From 916a68585e5078ff3f3190a9f77bee2f7b9b30a2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 6 Oct 2014 12:01:21 +0200 Subject: [PATCH] cleanup: error is already logged Function get_only_segment_using_this_lv() already prints error, no need to show more internal logic to user as an error. --- lib/metadata/pool_manip.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c index 6e2f2feef..439b8ed26 100644 --- a/lib/metadata/pool_manip.c +++ b/lib/metadata/pool_manip.c @@ -215,12 +215,8 @@ struct lv_segment *find_pool_seg(const struct lv_segment *seg) { struct lv_segment *pool_seg; - pool_seg = get_only_segment_using_this_lv(seg->lv); - - if (!pool_seg) { - log_error("Failed to find pool_seg for %s", seg->lv->name); - return NULL; - } + if (!(pool_seg = get_only_segment_using_this_lv(seg->lv))) + return_NULL; if ((lv_is_thin_type(seg->lv) && !seg_is_pool(pool_seg))) { log_error("%s on %s is not a %s pool segment",