From cb3763d57ba9a7e89d4accbf0aff074c294d29be Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 14 Nov 2021 22:30:57 +0100 Subject: [PATCH] cgroup-util: laccess() returns negative errno already --- src/basic/cgroup-util.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index e5f38c65d04..87f491808b7 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -587,10 +587,7 @@ static int controller_is_v1_accessible(const char *root, const char *controller) * - we can modify the hierarchy. */ cpath = strjoina("/sys/fs/cgroup/", dn, root, root ? "/cgroup.procs" : NULL); - if (laccess(cpath, root ? W_OK : F_OK) < 0) - return -errno; - - return 0; + return laccess(cpath, root ? W_OK : F_OK); } int cg_get_path_and_check(const char *controller, const char *path, const char *suffix, char **fs) { -- 2.47.3