]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - testsuite/test-initstate.c
test-initstate: Check for negative value on error
[thirdparty/kmod.git] / testsuite / test-initstate.c
index da2303a1a6bca65e4260c5dce67a74ec24ad6347..9332e8f21eeb80aa5821a03d5c624c280d67896f 100644 (file)
@@ -45,7 +45,7 @@ static noreturn int test_initstate_from_lookup(const struct test *t)
                exit(EXIT_FAILURE);
 
        err = kmod_module_new_from_lookup(ctx, "fake-builtin", &list);
-       if (err != 0) {
+       if (err < 0) {
                ERR("could not create module from lookup: %s\n", strerror(-err));
                exit(EXIT_FAILURE);
        }