]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/kmod-setup.c
tree-wide: have_effective_cap() may return negative errno
[thirdparty/systemd.git] / src / core / kmod-setup.c
index dcbc28205fef1317ae40992c57a921e6a1bf857c..e84374377788227fecafabab20e26e3211112be9 100644 (file)
@@ -130,7 +130,7 @@ int kmod_setup(void) {
         _cleanup_(kmod_unrefp) struct kmod_ctx *ctx = NULL;
         unsigned i;
 
-        if (have_effective_cap(CAP_SYS_MODULE) == 0)
+        if (have_effective_cap(CAP_SYS_MODULE) <= 0)
                 return 0;
 
         for (i = 0; i < ELEMENTSOF(kmod_table); i++) {