From: Lennart Poettering Date: Tue, 18 Feb 2025 21:30:31 +0000 (+0100) Subject: homework: unify common error handling X-Git-Tag: v258-rc1~1285 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ef8138946362f42111d1a53dfc91c796546ca50;p=thirdparty%2Fsystemd.git homework: unify common error handling --- diff --git a/src/home/homework.c b/src/home/homework.c index 40478232546..7eb42e1dac6 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -932,30 +932,23 @@ static int home_activate(UserRecord *h, UserRecord **ret_home) { case USER_LUKS: r = home_activate_luks(h, flags, &setup, &cache, &new_home); - if (r < 0) - return r; - break; case USER_SUBVOLUME: case USER_DIRECTORY: case USER_FSCRYPT: r = home_activate_directory(h, flags, &setup, &cache, &new_home); - if (r < 0) - return r; - break; case USER_CIFS: r = home_activate_cifs(h, flags, &setup, &cache, &new_home); - if (r < 0) - return r; - break; default: assert_not_reached(); } + if (r < 0) + return r; /* Note that the returned object might either be a reference to an updated version of the existing * home object, or a reference to a newly allocated home object. The caller has to be able to deal