From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> If the field passed into tracefs_filter_string_append() does not match a field of the event, or if the value is not proper, it fails to append the filter, but still returns 0 as it was successful. Return -1 if it fails. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/tracefs-filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tracefs-filter.c b/src/tracefs-filter.c index 85d0be17f6b7..b16dfadb3aa9 100644 --- a/src/tracefs-filter.c +++ b/src/tracefs-filter.c @@ -423,7 +423,8 @@ int tracefs_filter_string_append(struct tep_event *event, char **filter, free(*filter); *filter = str; } - return 0; + + return ret; } static int error_msg(char **err, char *str, -- 2.35.1