diff --git a/ubus_api_validator.c b/ubus_api_validator.c
index 874276d3333b9f80d32411a074080098f807e5d9..6e50f343896b8a30c00b78b600696b453ed490b4 100644
--- a/ubus_api_validator.c
+++ b/ubus_api_validator.c
@@ -80,7 +80,7 @@ static int validate_jobj(struct json_object *jobj) {
     const char *defstr = "no result";
 
     int rv = 0;
-    int rv_validation = 0;
+    int rv_validation = 1;
     char *format = NULL;
 
     tmp = json_object_array_get_idx(ubus_methods, i);
@@ -119,12 +119,12 @@ static int validate_jobj(struct json_object *jobj) {
       }
     }
 
-    if (!rv_validation || rc != res->rc) {
+    if (rv_validation && rc == res->rc)
+        ok(true, format);
+    else {
         ok(false, format);
         failed = 1;
-    } else
-        ok(true, format);
-
+    }
     free(res);
   }