From bebd2fe7e7ca0d70981e50b919b3d230e9c945de Mon Sep 17 00:00:00 2001
From: Milan Broz <gmazyland@gmail.com>
Date: Fri, 12 Oct 2018 09:44:28 +0200
Subject: [PATCH 067/324] Do not print error for used device twice.

---
 lib/setup.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/setup.c b/lib/setup.c
index e8ba704..9607bed 100644
--- a/lib/setup.c
+++ b/lib/setup.c
@@ -1540,12 +1540,8 @@ static int _crypt_format_luks2(struct crypt_device *cd,
 	}
 
 	r = device_check_access(cd, crypt_metadata_device(cd), DEV_EXCL);
-	if (r < 0) {
-		log_err(cd, _("Cannot use device %s which is in use "
-			      "(already mapped or mounted)."),
-			      device_path(crypt_metadata_device(cd)));
+	if (r < 0)
 		return r;
-	}
 
 	if (!(cd->type = strdup(CRYPT_LUKS2)))
 		return -ENOMEM;
-- 
2.19.1

