From 1cfe9737cf2973c9e3b27de79099ae897cea54c1 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 30 Sep 2024 21:21:53 +0200 Subject: [PATCH] gpt-auto: use RET_GATHER at one more place --- src/gpt-auto-generator/gpt-auto-generator.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index d69a16af81..6f0d7c877a 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -955,7 +955,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat } static int run(const char *dest, const char *dest_early, const char *dest_late) { - int r, k; + int r; assert_se(arg_dest = dest_late); @@ -975,12 +975,11 @@ static int run(const char *dest, const char *dest_early, const char *dest_late) if (arg_root_enabled) r = add_root_mount(); + else + r = 0; - if (!in_initrd()) { - k = add_mounts(); - if (r >= 0) - r = k; - } + if (!in_initrd()) + RET_GATHER(r, add_mounts()); return r; } -- 2.25.1