From: Mike Yuan Date: Mon, 30 Sep 2024 19:21:53 +0000 (+0200) Subject: gpt-auto: use RET_GATHER at one more place X-Git-Tag: v257-rc1~227^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cfe9737cf2973c9e3b27de79099ae897cea54c1;p=thirdparty%2Fsystemd.git gpt-auto: use RET_GATHER at one more place --- diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index d69a16af813..6f0d7c877a0 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; }