kmodloader: fix insmod path logic
[project/ubox.git] / kmodloader.c
index 865f2e2eab5ebc32ee993b68a3e473e3e76fc8b8..8fd989f189933ba4d471fd506a9d6d76e3966936 100644 (file)
@@ -942,8 +942,8 @@ static int main_insmod(int argc, char **argv)
                goto err;
        }
 
-       if (!(path = get_module_path(argv[1])) ||
-            (path = get_module_path(name))) {
+       if (!((path = get_module_path(argv[1])) ||
+             (path = get_module_path(name)))) {
                fprintf(stderr, "Failed to find %s. Maybe it is a built in module ?\n", name);
                goto err;
        }