tracing/filter: Do not WARN on operand count going below zero
[pandora-kernel.git] / kernel / trace / trace_events_filter.c
index 7f2e97c..2900d77 100644 (file)
@@ -1385,7 +1385,9 @@ static int check_preds(struct filter_parse_state *ps)
                if (elt->op != OP_NOT)
                        cnt--;
                n_normal_preds++;
-               WARN_ON_ONCE(cnt < 0);
+               /* all ops should have operands */
+               if (cnt < 0)
+                       break;
        }
 
        if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {