From 731c32338912c0b08e44a80207780d130657a702 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 4 Jan 2023 12:31:17 +0100 Subject: [PATCH] libmount: fix unused value [coverity scan] Signed-off-by: Karel Zak --- libmount/src/hook_mount_legacy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmount/src/hook_mount_legacy.c b/libmount/src/hook_mount_legacy.c index b268bdecb2..32d2f17e7b 100644 --- a/libmount/src/hook_mount_legacy.c +++ b/libmount/src/hook_mount_legacy.c @@ -292,7 +292,8 @@ static int hook_prepare(struct libmnt_context *cxt, rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT, NULL, hook_mount); - rc = mnt_context_get_mflags(cxt, &flags); + if (!rc) + rc = mnt_context_get_mflags(cxt, &flags); if (rc) return rc; -- 2.47.3